addyosmani / addyosmani/timing.js

Bookmarklet code broken in Firefox

Offen
#2 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
1.5k
Forks
110
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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)

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.