I'm accessing clipboard data on copy/paste event in browser. It's working fine. I want to check when system clipboard was lastModified. It's a readonly attribute available in clipboard interface. I am new to JS. Can anybody help?
Here is the link to clipboard api:
https://www.w3.org/TR/clipboard-apis/#dom-clipboarditem-lastmodified
Related
My background page saves data about the current active tab to chrome.storage.local. For arguments sake lets say it's the page title. Multiple page titles will be in there if the user has multiple tabs open.
When the browser action button is clicked I want to open a new tab with my internal extension page showthedata.html (not an external URL) which will show the data saved for the active tab.
Ideally I'd want to open showthedata.html?tabID=123 which would then pull the corresponding data
I must be missing something basic, but how can showthedata.html show the data relating to the active tab?
If you use your extension's URI as the URL of your new tab, it will allow you to use the API's messaging and storage systems from your new tab.
Create a New Tab
chrome.tabs.create({url: "chrome-extension://<your_extension_id>/path/to/file.html"})
Once you get that set up, you can pass variables to or request variables from your new tab via the Chrome API messaging system or storage system (provided you've built the proper functionality into your extension's various parts).
Note: The chrome.tabs namespace is not accessible from within a Chrome tab. It must be called from either your background script(s) or popup.
In an application I have files attached directly to the Notes document and not to the document via a Rich text field.
I would like to make those files available in the xp:fileDownload control but that allows only file binding to a Rich text object.
Binds the file control to a data element or other value which must be
of type rich text.
http://www-01.ibm.com/support/knowledgecenter/SSVRGU_9.0.0/com.ibm.designer.domino.ui.doc/wpd_controls_cref_filedownload.html
Is it possible to use the control somehow for making the files attached to the document available for download via this control?
try to download the file using domino url api
download
Domino URL
When you click on the link for an attachment in the File Download control in XPiNC, you are promoted to save the attachment. Is it possible to configure the File Download control to open the attachment directly instead of prompting the user to save it? We're using 8.5.2 FP3.
Handling of an "attachment" is primarily done by the Browser (XPiNC being a firefox browser inside Notes). If for example, a PDF plugin is installed in the browser and the servers sends the corresponding "application/pdf" mime-type with the file, the browser uses that plugin to display the file. The correlation between mime-type and plugin or external application in the browser is something the server/webapplication can not influence.
What you can do on the server side is sending the mime-type "application/octet-stream" instead of the one corresonding to the file type, causing the browser to display the "Select application or download" dialog. So in Xpages, you would have to redirect the download through a XPage, where you set the corresponding HTTP Headers as shown in Set cache headers on an XPage and How to force PDF files to open in browser?
I haven't used the file download control or XPINC, but it is definitely possible to make your xpage or view control open an attachment directly. This method bypasses the download control.
Please see this post from Stephan Wissel: http://www.wissel.net/blog/d6plinks/SHWL-86QKNM, which gives you some SSJS that you can use to build the URL. You can use it in the onClick method of a button. You are essentially duplicating the functionality of the download control in a way that does what you want it to do.
If you want to do the same thing from a view control, then see this post: http://notesspeak.blogspot.com/2013/02/how-to-launch-attachment-from-view.html
Note that different browsers behave slightly differently but it works in all the majors.
Michael,
Here is code I used:
var unid = rowValue.getUniversalID()
var url = getAttachmentURL(unid, "storetransfer.pdf", "Testing//test.nsf")
url = "/" + url + ";"
view.postScript("window.open('" + url + "', '_blank', 'height=120,width=650,top=10,left=10,resizable=yes');");
I did modify Stephan's code a bit since my data is in a different NSF than my code. You probably know this but the view.postScript allows you to call clientside javascript from SSJS. It always is the last thing to run, hence the name. This is the same code from the Notesin9 video mentioned in the comments. I just tested this and it works like I think you want, but in firefox it does try to block the popup, and then has to push "open". Hope this helps.
I want to read and fetch the contents of a cookie generated by web browser from activex control. I dont want to read the cookie from javascript and pass it to activex control. I want read the cookie directly from activex control. If it is possible then suggest me the APIs for that and also same thing I have to achieve using NPAPI also (so please suggest APIs in here also). So looking forward for some positive answers.
What you can do is
1) hook up Web Browser events, using for example this sample How to sink HTML document events for WebBrowser host
2) once you get a hold on the loaded IHTMLDocument2 document interface, just read the value of the cookie property:
CComPtr<IHTMLDocument2> pDoc // get document from event as shown in the sample.
// read the cookie
CComBSTR cookie;
hr = pDoc->get_cookie(&cookie);
More on this here: Handling HTML Element Events
Note: for NSAPI I suggest you write another question with other tags as this is a totally different world.
I've created a chrome extension with user form, which has list of existing bookmark folder in chrome and user comment via text box.
Is it possible to write the user form data to an existing excel sheet in local drive, with aid of chrome extension ?
Thanks for your time !
chrome extension is not alowed to access local files(see here).
to solve this problem, I sugest you to building a little webapp, host it on you localhost or server, then use XMLHttpRequest send your user data to your webapp, after that you can write it on an existing excel sheet.