Mailto with subject not working - mailto

I am building a site in Squarespace. I am trying to add a mailto: link with a subject.
Here's the code I used: mailto:email#myemail.com?subject=Website.
In Firefox and IE, clicking it opens a totally blank new tab. In Chrome, it opens up a blank new tag with the mailto code in the browser window. But the desired behavior is of course to have it open a mail client.

I don't think you can control this. mailto: depends on the user's desktop configuration.
They may have it open in a mail client, gmail or whatever their configuration is. You can't control how the mailto: works.

Related

Excel Hyperlink adding redirectURL

I'm creating a hyperlink in excel
=HYPERLINK("https://www.redacted.com/index.html?Display=GroupMeetings/index","link")
When I click on this link it changes the Url to
https://www.redacted.com/index.html?redirectURL=Display%3DGroupMeetings%2Findex
if I change the URL to have ?Displayy= with two y's it does not add the redirectURL attribute. I cannot find any documentation about why this is added. Anyone know why?
The end goal is to deep launch users to specific pages within the application via a hyperlink in excel.
Do the users need to be authenticated to view the pages you are sending them to?
If so the cause may be this (taken from this answer on super user https://superuser.com/a/445431/154198):
Clicking a URL in Excel seems to open it in your default browser. But that's not really true. Before opening it in your browser, Excel first runs Microsoft Office Protocol Discovery. This uses a Windows/Internet Explorer component to determine if the URL works. (It does not identify itself as Internet Explorer, but as "User Agent: Microsoft Office Existence Discovery".) And if the results are (somehow) okay then it will open the result of that check in your default browser.
Microsoft have issued a fix for this KB218153 - which can be found here:https://support.microsoft.com/en-gb/help/218153/error-message-when-clicking-hyperlink-in-office-cannot-locate-the-inte
This may not be your specific problem, but it is at least worth knowing about.

MS Excel 365: localhost urls open in native browsers instead of pop-up dialogue

I am using dialogueAsync to open some html pages for my custom application. When the urls are hosted on a remote system e.g. https://so-and-so.com/etc.html it opens up as a pop-up which is like a dialogue box.
The moment I change the url to localhost i.e.to a webpage deployed locally in my system - http://localhost:8080/etc.html, the html opens up in my default browser which as a new tab.
It is very painful to implement waiting / progress dialogues on my local, as dialogue does not close automatically - dialogWindow.close() never works.
Is there any way around?
For the first part: in the manifest that you are sideloading, what is the original base URL? It might be that you need to add your localhost to the AddDomains list:
https://dev.office.com/reference/add-ins/manifest/appdomain.
For the dialogWindow.close(), I suggest you open a separate question, to ensure that the question/suggestion doesn't get lost in being mixed in with your first question.

Why do mailTo links open gmail in the same window despite setting target=_blank?

I am trying to allow users of our website to click on a link and open a mail application / gmail to compose a message. I am using the mailTo method which opens my mail application on mac, however when I set gmail as my default mail application in browsers settings (eg chrome and firefox) it will open gmail in the same window as the page on which the link was clicked.
I know that target=_blank is not really intended for mailTo links but I tried it and even this does not open the link in a blank window.
Surely this isnt a bug in these browsers, there must be a way to do this.
Mailto does not open a window or tab in any instance. If you want to use a window or tab you need to configure a form and allow the form to open in your window/tab. Of course, you'll have to configure the form to send mail with whatever method is available on your server.
source

Chrome extension 2 questions

I have managed with my extension and using ajax call in the content script to call my server and get an answer back. But in the console I get a message like:
The page at https://www.injectedpage.com displayed insecure content from http://www.mywebsite.com/Script.asp
Is there something I can do to prevent this message appear?
One more question please.
If I distribute the .crx to other people, can they see my code in the .js page? I dont want them to know to which page in my server I post the data I send.
Thank you for reading me. And for your patience with me.
The first issue is due to the fact that the website you're injecting code into is https while your page is http. It's a security warning from Chrome that you can't hide.
Yes they can see your extension's complete code. You can obfuscate it but when you publish your extension you give the user the entire code.
If your extension has a popup thing from the toolbar, right click to inspect element and If it has a background page or something, you can inspect it from the extensions page (developer mode has to be checked)
To see all of the files of every extensions, a user can navigate to Chrome's extensions directory. For example, on Win7 it's
C:\Users\[username]\AppData\Local\Google\Chrome\User Data\Default\Extensions
User could also just rename your crx to zip and extract.

Calling chrome.browserAction.setIcon from content script the way it is done in background script

I am making an extension for chrome. It fetches data from webpages and emails it via local email client. I have a toolbar button which user has to click to invoke the script.
My script works for a few selected urls. I want my toolbar button to change icon based on whether the url is among our list or not. For example for site1 it should be redicon.png and for site2 it should be blueicon.png. I can change button icon using chrome.browserAction.setIcon. But the problem is that this API does not work in content script. It works fine in the background.js file but not in content.js. Kindly tell me how to achieve this.
I know using pageAction instead would do the trick but my client requirement is that the toolbar icon should change rather than appear and disappear.
What you need to read about is message passing. You are right, content scripts have limited chrome API. However, you can contact background page from content script and tell it to execute anything from chrome API for you. First, you need to create a listener on a background page that will be waiting for messages and then send a message from a content script.

Resources