Skype web control : Call feature is not working - javascript

I integrated the Skype web control for our website, chat feature is working very well.
But when I click on the the voice or video call.
It open a new tab where It try to load the url https://swc.cdn.skype.com/v/0.80.47/calling-popup.html
Which will give the error 404 (not found)
I have search the doc and other resourced available but no luck.
any help would be appreciated.
Note: If you know how to hide these icon without CSS. It will also help.
Thanks.
Resources:
Browser: Chrome (68.0.3440.106)
SKD url: https://swc.cdn.skype.com/sdk/v1/sdk.min.js
Doc: https://dev.skype.com/webcontrol
Issue: https://github.com/Microsoft/BotBuilder/issues/3882

The error you have there has nothing to do with Skype , it just a question of the path to the HTML that is supposed to trigger your link, check path, or if the file is there where the url points to.

Related

how to make chrome extension with options that allow you to open settings of chrome in new tab?

today i'm facing problem that i can't solve my problem is very simple i wanted to make
chrome extension that allow me to do some easy steps exomple i wanted to open chrome setting
in new tab with my extension i did setting botton in the extension and the clear browser data
and open extension of chrome but when i try to open it when i click nothing happen it keep
give me this error =
Not allowed to load local resource: chrome://settings/
and my code is this =
<div class="flex"><i class="fas fa-cogs" style="color:darksalmon "></i></div>
please help me to solve this error please and thank you very much
You cannot use the standard HTML anchor to open an internal Chrome link. Chrome’s links are not valid navigation protocols, only these are:
Website
Email
Telephone
Document Section
JavaScript
For a internal Chrome link you should open a new tab and pass the internal link to it via the Tab API...
https://developer.chrome.com/extensions/tabs
Use the function "create"...
chrome.tabs.create({'url':'chrome://settings/','selected':true}, function(tab){
/// Whatever else goes in here...
});

what is this strange "script" doing?

I am doing some test then find below code would pop up a window:
test
looks like it is trying to open an application.
Can anyone tell me what is the usage/purpose of this "script"?
looks like FF, Chrome, and IE all support it.
script is being used as a protocol. No applications handle the script protocol, so clicking it does nothing useful.
You can register a custom protocol handler and if the user accepts it, your application will be allowed to open all links of that type (there are only a few permitted protocols):
window.navigator.registerProtocolHandler('web+test', 'http://example.org/?handler=%s', 'Test Protocol');
Only example.org will be allowed to run the above code, but if you open your dev tools while visiting http://example.org/ and run the above code, you will get a dialog asking you to allow or deny the protocol association. If you accept it, click the following link on any website:
test
It will redirect to http://example.org/?handler=hello
Trying to open an application? That script is just a hyperlink, it does not tell anything else in the script, just that it will open a link into site that tells "test"

Force Auto Open Dialog in Chrome

FileRun has a beautiful File-Explorer Google-Drive styled. You can testdrive it here FileRunDemoSite
When I download a File I get to choose if I want to open the file directly in a Office Application.
When I click on Office, google prompts me with a Chrome Open File Dialog. The File opens directly from the location instead of being savend in /downloads/ folder.
How can I achieve this behavior? All existing answers on SA state that this is not possible, so this might be interesting to others as well. Not even google has implemented this. Is there a cross-browser solution?
Onedrive does it as well:
Credit to Thomas2D to get me on the right track. How it basically works is:
If you develop an application you can register a new protocol with the operation-system. http:// will be handled by your default browser. applicationX:// will be handled by applicationX, ms-word:// will be handled by word. If you click on a link the browser/operating-system looks up which application should handle the protocol an pass the request on to this application.
For Office documents the URI is a bit more complex ms-excel:ofv|u|http://contoso/Q4/budget.xls. You can open it readonly/ for edit / as a template. Check out this document for a detailed description of all the options: Office URI Schemes
For other applications check the URI Schemes with that application.
How to use it on a website:
It is not advisable to set a link to an application in a Dom element href attribute. You have no way of checking if the application is installed or not.
If you use Javascript you can check if the request times out / fails and use http:// instead.
. Set the protocol in a href: window.location.href = encodeURI('ms-excel:ofe|u|http://example.com/excel.xlsx') or by setting the the location.protocol, https://www.w3schools.com/jsref/prop_loc_protocol.asp
There is a jQuery Plugin to do that :jquery.applink.js
I personally think that this is accomplished by starting application via specific url.
I know that this works on iOS for launching application. In iOS it was done by something (simillar to mailto:example#example.com)
<script type="text/javascript" charset="utf-8">
window.location = "myapplication://myparams";
</script>
EDIT: I finally get it, you have to use application url scheme. For example, if you want to open your Excel file via browser, you have to use this JS code.
window.location.href = encodeURI('ms-excel:ofe|u|http://example.com/excel.xlsx');

Facebook didn't crawl the og:image when using sharethis

I have used sharethis plugin in my website. When I shared a particular page it does not crawl the correct image in the share popup window. But after sharing it to the facebook, I can see the correct image. It happens for a particular page only.
I have checked the og:image property and the image meets all its requirement. The dimension of the image is 362x550. I have no idea why it doesn't crawl the image.
Please anyone assist me to get resolve this issue.
Here is the link I shared via sharethis.
Page Link:
https://www.getcensored.com/m/photocontest/view/Kassie-Tocko
I can't give you exactly solution, but will try to give you at least some direction.
So what I observed with FB debug tool: https://developers.facebook.com/tools/debug/og/object/
Put initial link https://www.getcensored.com/m/photocontest/view/Kassie-Tocko#st_refDomain=&st_refQuery= and you will see that FB will see your og:image tag
Put some other anchor https://www.getcensored.com/m/photocontest/view/Kassie-Tocko#test1 and click "Fetch new scrape information", you will see a message about parsing error, then try to fetch again and you will see og:image
Try repeat 2. several times with different anchors
I had a similar issue, but the problem was 301 redirect, but you don't have it. May be try disable https and test FB sharing via http, just for test. May be problem is with your SSL negotiation time. Some info related FB and SSL here http://www.webpagetest.org/forums/showthread.php?tid=11788
For facebook to get to your image it needs the total url to your image and not the relative url..
Example of tht url that facebook expects to be in its og:image tag content :
http://www.exmaple.com/images/img1.png
I hope this helps you.

Google Drive API, can't open standard sharing dialog via JS (x-frame-options error)

I have a JavaScript app which uses the Google Drive API. I read how to open a standard sharing dialog here: https://developers.google.com/drive/web/manage-sharing
<head>
...
<script type="text/javascript" src="https://apis.google.com/js/api.js"></script>
<script type="text/javascript">
init = function() {
s = new gapi.drive.share.ShareClient('<MY_APP_ID>');
s.setItemIds(["<MY_FILE_ID>"]);
}
window.onload = function() {
gapi.load('drive-share', init);
}
</script>
</head>
<body>
<button onclick="s.showSettingsDialog()">Share</button>
</body>
Seems like I do everything right, when I click my share button, the dialog starts loading but it can't be loaded.
In the console I see:
Refused to display 'https://drive.google.com/share?...' in a frame
because it set 'X-Frame-Options' to 'SAMEORIGIN'.
I've googled this error and I've seen that there are some similar questions in SO and other sites, but they don't help. I guess Google doesn't allow itself to be in a frame in a not-google-site (cause of "SAMEORIGIN").
What can I do to open sharing dialog in my app?
The "Launching the Google Drive sharing dialog in your app" page here states:
The URL of the page that launches the dialog must have the same origin
as the Open URL registered for the app.
If you then look at the instructions to "Configure the Drive SDK" here, you can see that the "Open URL" section reads:
There are two important things to keep in mind for the Open URL:
Make sure you give a fully qualified domain name for Open URL -- localhost won't work.
The URL must belong to you. After the app registration is complete, you'll need to verify your ownership of this URL in order to create a
Chrome Web Store listing. For more information, see Site Verification.
Hence your page which is launching the dialog does not have the same origin as the Open URL registered for the app in you Google Drive SDK settings. So to fix your problem correct the Open URL so that it has the correct URL i.e. a URL with the same origin as the Open URL. Note that you can change the Google Drive SDK settings via https://console.developers.google.com/project.
As well as making sure the Open URL is set correctly. You'll also need to substitute your Drive SDK app ID for 'MY_APP_ID'. You can find the App ID by following these instructions:
Goto https://console.developers.google.com
Click your project
Click "APIs and auth" on the left
Click the "Drive SDK" settings cog icon
The "App ID" can then be found under the "Google Drive SDK" title e.g. App ID: 47XXXXXXXX3
The problem was solved thanks to this answer https://stackoverflow.com/a/20742994/1185123
dan-man says in his answer:
Client ID You can find this in the Google Cloud Console - see above.
Mine is a 12 digit number, so yours will probably be too.
Mine client id looks like
175564412906-ui22fsaghkvkkj09j2bprku55m8k3d0d.apps.googleusercontent.com
I've used this id in
s = new gapi.drive.share.ShareClient('<MY_APP_ID>');
After reading the answer, I tried to use only first 12 digits of my client id. I didn't expect it to work, I was just desperate. But the strange thing, it works perfectly!
If somebody can explain why it works and why nothing about this is said in the documentation — you are welcome to answer!

Categories