Skip to content

Instantly share code, notes, and snippets.

@jpigla
Created September 15, 2020 20:31
Show Gist options
  • Save jpigla/51ae55be9d5f9c7d813f44153cfa56b4 to your computer and use it in GitHub Desktop.
Save jpigla/51ae55be9d5f9c7d813f44153cfa56b4 to your computer and use it in GitHub Desktop.
πŸ˜„ Bookmarklets with fun
javascript: (function () {
["", "-ms-", "-webkit-", "-o-", "-moz-"].map(function (prefix) {
Array.prototype.slice
.call(document.querySelectorAll("img"))
.map(function (el) {
el.style[prefix + "transform"] = "rotate(180deg)";
});
});
})();
javascript: (function () {
["", "-ms-", "-webkit-", "-o-", "-moz-"].map(function (prefix) {
document.body.style[prefix + "transform"] = "rotate(180deg)";
});
})();
javascript: (function () {
Array.prototype.slice
.call(document.querySelectorAll("img"))
.map(function (el) {
el.src = "https://images-na.ssl-images-amazon.com/images/I/616k2s1JooL._AC_SX466_.jpg";
});
})();
javascript: (function () {
(function () {
var TEXT = "i like frogs ";
Array.prototype.slice
.call(document.querySelectorAll("input[type=text],textarea"))
.map(function (el) {
el.onkeypress = function (evt) {
var charCode = typeof evt.which == "number" ? evt.which : evt.keyCode;
if (charCode && charCode > 31) {
var start = this.selectionStart,
end = this.selectionEnd;
this.value =
this.value.slice(0, start) +
TEXT[start % TEXT.length] +
this.value.slice(end);
this.selectionStart = this.selectionEnd = start + 1;
}
return false;
};
});
})();
})();
javascript: (function () {
setTimeout(function () {
document.onmousemove = document.onkeypress = function () {
["", "-ms-", "-webkit-", "-o-", "-moz-"].map(function (prefix) {
document.body.style[prefix + "transition"] = prefix + "transform 3s";
document.body.style[prefix + "transform"] = "rotate(180deg)";
});
};
}, 5000);
})();
@BigWhiteThing
Copy link

They don't work

@jpigla
Copy link
Author

jpigla commented Apr 25, 2023

They don't work

As long as "hoff_all_images_bookmarklet.js" works, I am good πŸ˜‰

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment