how to run greasemonkey script before the page content is displayed?

EDIT: This post was created prior to the implementation of the @run-at key in Greasemonkey – as noted by Blaise, from Greasemonkey 0.9.8 you may now have the script executed as soon as the page begins to load. @run-at document-start is described in the wiki as follows: Start is new as of version 0.9.8. The … Read more

Exact difference between add-ons, plugins and extensions

General rule of thumb: Plugins When you’re talking about a web browser, a plugin talks about a NPAPI or similar plugin, which is specific to the page. IE doesn’t support “plugins” per se, but they have activex controls which can fill a similar function, though there are also BHO (Browser Helper Object) ActiveX controls which … Read more

Add-on “appears to be corrupt” when trying to install my add-on’s .xpi file in Firefox

The .xpi file must use only “deflate” compression or uncompressed The zip implementation within Firefox only supports uncompressed files or files compressed with the “Deflate” algorithm. You will need to create the .zip archive using the compression method “Deflate” instead of the “LZMA” which you are currently using. How to do so will depend on … Read more

Can a site invoke a browser extension?

Since Chrome introduced externally_connectable, this is quite easy to do in Chrome. First, specify the allowed domain in your manifest.json file: “externally_connectable”: { “matches”: [“*://*.example.com/*”] } Use chrome.runtime.sendMessage to send a message from the page: chrome.runtime.sendMessage(editorExtensionId, {openUrlInEditor: url}, function(response) { // … }); Finally, listen in your background page with chrome.runtime.onMessageExternal: chrome.runtime.onMessageExternal.addListener( function(request, sender, sendResponse) … Read more

What is this JavaScript syntax: {Ci, CC}? [duplicate]

This is called destructuring assignment. It is a feature of JavaScript 1.7, where in this context “JavaScript” refers to Mozilla’s specific extensions to the ECMAScript standard. It is slated for inclusion in the next version of JavaScript. The equivalent ECMAScript 5 code would be var __temp = require(‘chrome’); var Cc = __temp.Cc; var Ci = … Read more

How to view “generated HTML code” in Firefox?

In Firebug’s HTML tab, right-click the root node and select “copy HTML”. Then paste to a text editor. Without Firefox Add-Ons, you could use a bookmarklet like this: javascript: var win = window.open(); win.document.write(‘<html><head><title>Generated HTML of ‘ + location.href + ‘</title></head><pre>’ + document.documentElement.innerHTML.replace(/&/g, ‘&amp;’).replace(/</g, ‘&lt;’) + ‘</pre></html>’); win.document.close(); void 0;

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)