Category : firefox-addon-sdk

I wanted to try my hand at making a youtube-dl GUI accessible from Firefox, as practice. However, it doesn’t seem that easy; from what I understand, you can’t launch executables client-side using JavaScript unless you use ActiveXObject which apparently only works on IE. Makes sense for security reasons but doesn’t help my case too much… ..

Read more

I tried let { setTimeout } = require(‘sdk/timers’); browser.webNavigation.onCompleted.addListener(setTimeout(resetSpeed, 3000)); browser.webNavigation.onHistoryStateUpdated.addListener(setTimeout(resetSpeed, 3000)); (…) it didn’t work. Another try: browser.webNavigation.onCompleted.addListener(resetSpeed); browser.webNavigation.onHistoryStateUpdated.addListener(resetSpeed); function resetSpeed() { await new Promise(r => setTimeout(r, 2000)); (…) That didn’t work also. Without the sleep function, my code used to automatically speed up audio/videos on page load works ~25% of the time, and ..

Read more

Works: chrome.browserAction.onClicked.addListener(function (tabs) { if (allowedAddresses(tabs.url)) { chrome.tabs.sendMessage(tabs.id, { command: "getVideosArray" }, function ( response ) { setIconBadgeTextFromValue(tabs.id, response); }); } }); But doesn’t work when I want it to specify which mouse key was used: chrome.browserAction.onClicked.addListener(function (tabs) { if (allowedAddresses(tabs.url) && OnClickData.button == 0) { chrome.tabs.sendMessage(tabs.id, { command: "getVideosArray" }, function ( response ) ..

Read more

I am using Bookmark Highlighter. The problem with it is that, it sometimes does not work when the extension is loaded before the page is loaded. For Example: If you bookmark https://www.pluralsight.com/courses/protocol-deep-dive-icmp, then go to https://www.pluralsight.com/search?q=Protocol%20Deep%20Dive, it does not highlight the bookmark. In the extension review page it says It looks like some links on ..

Read more