addyosmani / addyosmani/timing.js

Bookmarklet code broken in Firefox

Aperta
#2 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
1.5k
Fork
110
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

The `javascript:!function () { … }();` format is not compatible with Firefox. I propose switching to `javascript:(function () { … }());`. (I'm referring to the Bookmarklet code displayed in the README.)

If a `javascript:!function…` bookmarklet is executed in Firefox, its code is loaded and executed inside the address bar, which in turn kills the current page. I guess, this is due to the code evaluating to `true`, unlike `javascript:(function…` which evaluates to `undefined`.

Note: This could be Windows-specific. Test here: http://jsfiddle.net/tot41ndo/ (drag into Bookmarks bar to test)

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.