Add undefined to all bookmarklets for firefox compatibility.

On Firefox, clicking a bookmarklet will cause the page to display
the last return value of the bookmarklet, deleting the rest of the
page contents. The solution is to add undefined; at the end.
This commit is contained in:
Ethan Dalool 2020-08-12 13:54:09 -07:00
parent 1949fe6533
commit b4ca46a165
6 changed files with 9 additions and 7 deletions

View file

@ -1,3 +1,3 @@
javascript: javascript:
Array.from(document.getElementsByTagName("Video")).forEach(function(e){e.loop=true;e.play()}) Array.from(document.getElementsByTagName("Video")).forEach(function(e){e.loop=true;e.play()})
undefined;

View file

@ -872,3 +872,4 @@ function main()
} }
main(); main();
undefined;

View file

@ -1,5 +1,4 @@
javascript: javascript:
function give_event(player, index) function give_event(player, index)
{ {
/* /*
@ -18,3 +17,4 @@ for (var index = 0; index < players.length - 1; index += 1)
give_event(players[index], index); give_event(players[index], index);
} }
players[0].play(); players[0].play();
undefined;

View file

@ -9,3 +9,4 @@ function rename()
} }
rename(); rename();
undefined;

View file

@ -1,5 +1,4 @@
javascript: javascript:
function unrowspan(tbody) function unrowspan(tbody)
{ {
var rows = tbody.children; var rows = tbody.children;
@ -24,3 +23,4 @@ function unrowspan(tbody)
var tbodies = Array.from(document.getElementsByTagName("tbody")); var tbodies = Array.from(document.getElementsByTagName("tbody"));
tbodies.forEach(unrowspan); tbodies.forEach(unrowspan);
undefined;

View file

@ -1,5 +1,4 @@
javascript: javascript:
CSS = "" CSS = ""
+ "* {margin: 0; padding: 0}" + "* {margin: 0; padding: 0}"
+ "html {height: 95%}" + "html {height: 95%}"
@ -112,3 +111,4 @@ function main()
} }
main(); main();
undefined;