Menu
  • HOME
  • TAGS

Installing Firefox and Google Chrome Extensions?

Tag: google-chrome,firefox,google-chrome-extension,firefox-addon,windows-installer

I am installing Firefox (XPI) and Google Chrome (CRX) add-ons via an installer. I have setup the installer to create the following registry entries,

HKEY_LOCAL_MACHINE\Software\Google\Chrome\Extensions\extension's ID\ - "path", "version"

HKEY_LOCAL_MACHINE\Software\Mozilla\Firefox\Extensions\ - "extension's ID"

Once the browsers are opened after this, the extensions are detected and installed, I mean when the browsers see that these registry entries exists, it adds the extensions to its' lists.

This is OK. However, when the Firefox is opened it asks the user that there is a new extension and asks the user to enable it. At this point the user has to enable it. Asking part is OK but is there way to make it auto enabled on first install?

On Google Chrome it is installed and not enabled as Firefox. But unlike Firefox it never shows a message that there is a new extension. So is there a way to either notify the user (like Firefox) to enable it or auto enable it (although, it seems that after Google Chrome version 25 it will not enable the extension)? At least ask the user?

Best How To :

I cannot really comment on Chrome, so I'll just quote them.

Extensions installed by third party programs using external extension deployment options will be disabled by default. When a third party program installs an extension, the Chrome menu will be badged, and users can click through the Chrome menu to see a dialog containing an option to enable the extension or to remove it from their computer. (Source: http://blog.chromium.org/2012/12/no-more-silent-extension-installs.html)

Not sure if the "badge" bits are still the case, though, considering this post is from 2012 and IIRC there are plans to outright disable all non-webstore installs at some point.

Regarding Firefox: No, there is no supported way of doing silent or auto-enabled add-on installs in Firefox. In fact, attempting to circumvent the opt-in dialog violates the Add-on Guidelines and can get your add-on blocklisted, even if your add-on was never listed on the official add-ons site.

Regarding @Noitidart's comment:

I also don't know how to do silent install but this guy says in a comment that addon sdk does it silenty, so check it out: https://ask.mozilla.org/question/301/open-firefox-profile-with-nsiprocess-and-access-it-via-privealaged-scope/?answer=311#post-id-311

Well, the cfx run command of the SDK overwrites some preferences in the Firefox profile (it usually creates) to have the add-on auto-enabled. This is OK for development stuff, but is not OK if you push your add-on to unsuspecting end-users and therefore is a blocklist-able offense.

Google reCAPTCHA fail for second time submit

javascript,php,jquery,google-chrome,captcha

Google reCAPTCHA gives this two function: I always use this in my all ajax powered forms. grecaptcha.getResponse() grecaptcha.reset(); For both of your problem use second function whenever you need in your java script code. Remember this works if you have only one captcha in your page. If you have more...

Inconsistent display on IE & Firefox

html,css,internet-explorer,firefox,twitter-bootstrap-3

Adding clearfix divs as explained here helped to resolve the display issues. Fix applicable in my scenario was adding <div class="clearfix"></div> after the four items of the first row...

Show Firefox OS devtools on Firefox Developer Edition 'desktop'

firefox,firefox-os,gecko,firefox-developer-tools,firefox-developer-edition

When you connect your phone, you have to accept remote debugging. Then on the left of the window, you should see a dropdown menu with the apps that you can debug. By default, you can only debug unprivileged applications. Click on the app, the you want to debug and in...

Rss is not working in Google Chrome usin PHP MYSQL

php,mysql,google-chrome,rss

This is because chrome doesn't have an inbuilt RSS reader, you have to sue an extension.

Chrome - Script tag isn't blocking

javascript,html,google-chrome

Scripts are executed in the order they appear in the HTML (unless you use the async or defer attributes). Browsers are perfectly welcome, however, to download them in any order they like, including in parallel, and including in parallel with other resources such as CSS files and images they find...

C# native host with Chrome Native Messaging

c#,google-chrome,chrome-native-messaging

Assuming the manifest is set up properly, here is a complete example for talking to a C# host using the "port" method: using System; using System.IO; using Newtonsoft.Json; using Newtonsoft.Json.Linq; namespace NativeMessagingHost { class Program { public static void Main(string[] args) { JObject data; while ((data = Read()) != null)...

How to display red borders on required or invalid value input element in Chrome just like Firefox behaviour for HTML5 validation?

css,html5,google-chrome,firefox

You use the :valid pseudo class. To shamelessly copy the code from https://developer.mozilla.org/en-US/docs/Web/CSS/:valid: input:invalid { background-color: #ffdddd; } form:invalid { border: 5px solid #ffdddd; } input:valid { background-color: #ddffdd; } form:valid { border: 5px solid #ddffdd; } input:required { border-color: #800000; border-width: 3px; } <form> <label>Enter a URL:</label> <input type="url"...

Bug in Chrome: render big box-shadow

css,google-chrome

You can emulate inset box-shadow using filters. Like this: http://jsfiddle.net/igoradamenko/vmeortsf/ HTML: <div class="shadow"> <div class="blurred"></div> </div> CSS: .shadow { position: absolute; top: 0; bottom: 0; left: 0; right: 0; background: #555; } .blurred { position: absolute; top: 0; bottom: 0; left: 0; right: 0; margin: auto; width: 60%; height: 60%;...

CSS flexbox wraps content in FireFox (not Chrome)

css,google-chrome,firefox,flexbox,pseudo-element

Weird. button elements have some special behavior which seems to conflict with flexbox. Specifically, what happens is that the flex items are blockified, according to the spec: The display value of a flex item is blockified: if the specified display of an in-flow child of an element generating a flex...

Chrome Push Notifications: can't subscribe from sub-path

google-chrome,push-notification

Use a slash before the name of the manifest file. The slash denotes that it is has to pick up the file from the root of the domain. <link rel="manifest" href="/manifest.json"> ...

HTML & CSS - Full Screen Image

html,css,html5,google-chrome,website

I think you are asking about Parallax. Explore a bit on Parallax in Wiki and see some samples here...

Google Chrome - How to compile Google Chrome in Windows?

google-chrome,visual-c++,windows-8.1,ninja

DONE. Windows 8.1 Pro 64-bit. Visual Studio 2013 Community edition Step 1: C:\>mkdir folder C:\>cd folder C:\>unzip https://src.chromium.org/svn/trunk/tools/depot_tools.zip C:\folder>dir Directory of C:\folder 18/04/2015 02:59 <DIR> depot_tools 0 File(s) 0 bytes 3 Dir(s) 67 387 064 320 bytes free Step 2: C:\folder\depot_tools>git config --global user.name "John Doe" C:\folder\depot_tools>git config --global user.email "[email protected]" C:\folder\depot_tools>git config...

“Tainted canvases may not be loaded” Cross domain issue with WebGL textures

google-chrome,gwt,libgdx,html5-canvas,webgl

are you setting the crossOrigin attribute on your img before requesting it? var img = new Image(); img.crossOrigin = "anonymous"; img.src = "https://graph.facebook.com/1387819034852828/picture?width=150&height=150"; It's working for me var img = new Image(); img.crossOrigin = "anonymous"; // COMMENT OUT TO SEE IT FAIL img.onload = uploadTex; img.src = "https://graph.facebook.com/1387819034852828/picture?width=150&height=150"; function uploadTex()...

Text Align Center in Chrome (webkit)

css,google-chrome

The issue isn't with display: table-cell but the nature of the span element. Please note that the text-align property in CSS is used for aligning the inner content of block-level elements. The HTML span tag is an inline-level element. Hence, it doesn't apply by default to inline-level elements and therefore...

$(this).val() not working in FireFox but works in Chrome

javascript,jquery,html,google-chrome,firefox

I found a work around that seems to work in Firefox. I change the type of input to number on focus giving me the proper keypad on mobile but then change the type back to text on blur giving me to two decimal places. See the code below... $('input.drawer').on('blur', function(){...

How to set caret to newly added element in contentEditable element?

javascript,jquery,google-chrome

A simple solution if you don't absolutely need the top contenteditable element to be a p element, is to add a contenteditable div as parent of your p element. Enter will automatically add p elements. <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div id='content' contentEditable=true><p>test</p></div> ...

Character rendering is different (IE/Chrome)

html,css,google-chrome,internet-explorer

When the font in use doesn't contain a character you want to display, the browser uses a fallback font which does. Now in this case, it turns out that IE and Chrome use different fonts to fall back to. Solution: use a font of which you are certain that it...

Chrome UDP sockets not receiving from remote machine

javascript,sockets,google-chrome,udp,google-chrome-app

François Beaufort's now deleted answer provided a useful suggestion, sadly in a way that was more appropriate for a comment. I'm making this a community wiki so that he does not feel robbed of reputation. The HOST part indicates which interface you're listening on for data. Setting it to 127.0.0.1...

Errors in Firefox Add-on SDK when using cfx xpi whereas cfx run works great

javascript,firefox,firefox-addon-sdk

(Not technically an answer but SO won't let me comment.) You could try cfx run, then uninstalling the addon from the FF session it opened, then installing the xpi in that same session by doing a file open of the xpi (which will install it). Have a feeling it will...

“sort not a function” error in angularjs only in google chrome

javascript,angularjs,google-chrome,sorting

Your response is not an Array. It could be an object with a property that contains the Array (e.g. response.data) or a string version of you array and then you will need to use JSON.parse and convert the string into an Array. Anyway, sort is on Array's prototype - that...

What does the double colon mean in Scope Local variables in Chrome's debugger?

javascript,google-chrome,debugging

It means that the property name is actually the string "legend:". You can tell by the syntax highlighting. For example: obj['legend:'] = 'value'; ...

Exact solution to keep cookie after closing firefox

firefox,cookies

From here To summarize: In case you are using "Clear history when Firefox closes": do not clear Cookies do not clear Site Preferences Clearing cookies will remove all specified (selected) cookies including cookies that have an allow exception. Tools > Options > Privacy: History: [X] Clear history when Firefox closes...

How SCSS rule evaluation done by browser

html,css,google-chrome,mozilla

Assuming the "comment" you speak of literally begins with // in your source file, in which case it is not a proper CSS comment but simply garbage (as the forward slash is not part of a CSS identifier or any valid CSS selector syntax), this causes a parse error. The...

1px white spacing in Chrome between div's

css,google-chrome

Pixel rounding. If your width generated is 1000px, each column should be generated at 333.33̅px. However, each browser/version handles decimal pixels differently unfortunately. Here's a handy guide: http://cruft.io/posts/percentage-calculations-in-ie/ Shock horror that IE is the worst. If you run it in IE, make sure your window is 1001px wide and see...

php redirection working in chorme but not on firefox

php,google-chrome,mozilla

have you tried using header('location') function? example : <?php if (isset($_POST['putonline'])) { $query = "UPDATE user SET status= '1' WHERE id= '$new_id'"; $result = $cid-> query($query); if ($result== TRUE) { header("location:EidEmp.php"); die(); } else { echo "Failed"; } } ?> Edited : Maybe Change Your header function with javascript function...

String replace with regex, ie strange results

javascript,regex,google-chrome,internet-explorer

You're misusing the compile method. Warning: The compile method is deprecated, you shouldn't use it. Create a new RegExp object instead. It's prototype reads: regexObj.compile(pattern, flags) So you have to pass it a new pattern that will replace the instance's pattern. Under IE, calling compile() yields the regex /(?:)/ which...

Can I fire up a Chrome extension API from code?

javascript,google-chrome,google-chrome-extension

So I'm answering my own question. I've managed to get it working using externally_connectables. The externally_connectable manifest property declares which extensions, apps, and web pages can connect to your extension via runtime.connect and runtime.sendMessage. 1. Declare app/webpage in manifest.json Just declare your web-app/page within your manifest.json as an externally_connectable. E.g...

How to use a Web Inspector with emulated android device (AVD)

android,google-chrome,android-emulator,avd,web-inspector

After much work, here's how to do it, for anyone trying to figure this out in the future.

Document won't load into iframe with changed, but proper, name

javascript,html,google-chrome,iframe

Stumbled upon this link: http://help.dottoro.com/ljbimuon.php After some modification of your script, i believe this could be the solution. Changing the contenWindow.name instead of name alone seems to do the trick. function change_name() { var one = document.getElementById('frame1'); one.contentWindow.name = "#"; console.log("The name is: " + one.name); console.log("The name of the...

Difference between Google Chrome and Canary

google-chrome

Yes, but make sure that you test the sites with Chrome first when you face a bug. I once had a strange behavior where chars were missing in the sites source and hours later I found out that it was a bug in Canary. I did this for a...

How do I change chromes Date-parsing / Sorting to match ff/ie Dateparsing?

javascript,jquery,google-chrome,date,momentjs

The problem you are facing is most likely caused by the fact, that different browser (engines) implement different algorithms for sorting. The differences you experience are (at first glance) all focused on elements that have no difference (e.g. 0 returned from your sort-function) and thus have no deterministic sort-behavior described....

Access DOM elements data document->Iframe ->Iframe->method chrome extension

javascript,google-chrome,iframe,google-chrome-extension

This was my solution after all, between what we talk over comments and my research over docs and other threads: Content script: (function () { document.addEventListener("DOMContentLoaded", function () { contentBody = document.getElementById("contentBody"); contentBody.addEventListener("load", function () { rawContent = contentBody.contentDocument.getElementById("rawContent"); if (rawContent) { var s = document.createElement("script"); s.src = chrome.extension.getURL('injected.js'); s.onload...

Is there a way to set breakpoints for every js line in the chrome dev tools?

javascript,google-chrome,devtools

Once your code breaks, there's a button beside "resume script execution" called "step over next function call" or F10, which will resume step by step.

Dart Polymer: Creating PaperDialog with CoreAnimatedPages displayed incorrectly in Firefox

firefox,dart,polymer

If you CSS is not inside a Polymer element you need to add the polyfill version of the selectors to make it work on browsers without native shadow-DOM support html paper-dialog, html /deep/ paper-dialog { margin-top: -150px; margin-left: -300px; } html paper-dialog core-animated-pages, html /deep/ paper-dialog /deep/ core-animated-pages{ height: 300px;...

woocommerce thumbnails have different image widths in chrome and mozilla

html,css,wordpress,google-chrome,mozilla

Having to override default styles is one of the reasons I hate Bootstrap... image HTML has a width/height 180px180px... but there is a conflict between parent container for image woocommerce-layout.css #single-product div.thumbnails a { width: 100%; } .woocommerce #content div.product div.thumbnails a, .woocommerce div.product div.thumbnails a, .woocommerce-page #content div.product div.thumbnails...

css tricks for font awesome in placeholder for chrome

html,css,google-chrome,placeholder

Thanks @JDTLH9 for giving me a clue for the problem .actually you dont have to use inline style but in the previous design i was using {font-family:fontawesome}; but when i converted it to this : {font-family:Arial,fontawesome} it worked for me in the chrome....

Firefox dropdown menu click

html,firefox,select,drop-down-menu

Why is your code surrounded by an a-Tag (<a href=""></a>) ? If you click on the content (e.g. your dropdown) the href="" reload the page. Remove the a or change href="" to href="#".

Intern's pollUntil does not work with Chrome

javascript,google-chrome,intern,leadfoot

false is considered a value by pollUntil. You need to return null or undefined if you want it to continue polling: return remote.get(newAddress) .then(pollUntil('return document.readyState==="complete"||null;', [], 30000)) .takeScreenshot().then(function(data) { recordImage(newAddress, data); }) From the docs: The function should return null or undefined if there is not a result. If the...

What's the best way To edit CSS and JS of Html Template [closed]

javascript,css,html5,google-chrome,google-chrome-devtools

Try Livereload, it works great for me with Chrome. You could also use workspaces and edit in browser.

chrome linkurl not returning proper url

javascript,jquery,google-chrome

The "proper" URL is one of the parameters in the large URL, if you look closely - it's the "url" parameter. There are libraries that will take care of parsing the URL parameters and decoding for you if you want to get the proper URL to which that larger one...

Why is position of html button in tablecell different in Firefox

html,css,firefox,cross-browser

Just add vertical-align:top to the table-cell; http://jsfiddle.net/1kg8a6rb/1/

Jquery not working while browsing with Firefox

javascript,jquery,firefox

You didn't pass event argument try like this $("#cart").click(function(event) { // now put your code here } ...

Dgrid - Firefox breaks while trying to load large data set in dgrid

javascript,firefox,dojo,dgrid,broken-pipe

I don't really know what is wrong per sey, but I would imagine that you are having memory issues. I was using Gridx with about 15,000 rows and had lots of problems with memory until I implemented the JSONRest store. For so many rows, I would strongly recommend to use...

$.ajax.done works on Firefox but not in Chrome

php,jquery,ajax,google-chrome

The problem is when I was firing the ajax request. I was doing it in "onchange" (of a input text with jQuery autocomplete) jQuery event. When I select an item of the list of autocomplete, the onchange() event is not raised in Chrome (yes in Firefox). So I fire the...

xul overlay for new menu in TB/Firefox main menubar

firefox,firefox-addon,overlay,xul

You need the menubar id, which is main-menubar and also your missing the menupopup. I have not tested, but this looks right to me: <menubar id="main-menubar"> <menu id="test-menu" label="TEST" accesskey="d"> <menupopup id="test-popup"> <menuitem id="example-item2" oncommand="alert('Hello!');" label="TEST" accesskey="i"/> </menupopup> </menu> </menubar> If your trying to find the id of things like...

XUL iframe firefox addon, how to change the src within the iframe?

javascript,firefox,iframe,firefox-addon,xul

With iframe in XUL you must create it with the HTML namespace otherwise things like load events don't work right, see this topic: http://forums.mozillazine.org/viewtopic.php?f=19&t=2809781&hilit=+iframe Once you do that, changing src etc should work as expected....

for of loop querySelectorAll

javascript,google-chrome,for-loop,mozilla,queryselectorall

The docs are correct, but I wouldn't call this a bug. Rather it's a "not yet implemented feature". There is no standard for this, and there is still active discussion on how the DOM should integrate with ES6. Notice that it is clear that querySelectorAll should return something iterable which...