Skip to content

Instantly share code, notes, and snippets.

View antonhedstrom's full-sized avatar

Anton antonhedstrom

  • Personalkollen
  • 10:42 (UTC +01:00)
View GitHub Profile
@antonhedstrom
antonhedstrom / random_sound.js
Created November 24, 2016 17:25
Prank: Play random sound
// Install Chrome extension (in order to execute after page reloads as well):
// https://chrome.google.com/webstore/detail/custom-javascript-for-web/poakhlngfciodnhlhhgnaaelnpjljija
// After installation, add script and right the icon and choose 'Hide in Chrome Menu'.
(function() {
var defaultDelay = 3 * 60; // secs
var numberOfRuns = 0;
var soundUrls = [
'http://www.szworld.net/scary-sounds/downloader.php?file=audio/final-scream.mp3',
'http://www.szworld.net/scary-sounds/downloader.php?file=audio/howl-mono.mp3',
onClickMagnifyIcon: function() {
var dsw = document.getElementByClassName("dynamic-search-wrapper");
if (!!dsw[0].className.match(new RegExp('(\\s|^)'+'search-open'+'(\\s|$)'))) {
dsw[0].className = 'dynamic-search-wrapper';
} else {
dsw[0].className += ' search-open';
}
var self = this;
@antonhedstrom
antonhedstrom / scary_prank.js
Last active April 9, 2024 21:24
Scary prank
// Install Chrome extension (in order to execute after page reloads as well):
// https://chrome.google.com/webstore/detail/custom-javascript-for-web/poakhlngfciodnhlhhgnaaelnpjljija
// After installation, add script and right the icon and choose 'Hide in Chrome Menu'.
(function() {
var imgUrl = 'http://1.bp.blogspot.com/-GGQgBdfMYJ0/Tw82LPGILnI/AAAAAAAABIw/V_1hnWbKgRw/s1600/scary_05.gif';
var soundUrl = 'http://www.szworld.net/scary-sounds/downloader.php?file=audio/final-scream.mp3';
var defaultDelay = 3 * 60; // secs
var duration = 2000; // msec
var alertText = ' ⚠ ALWAYS LOCK IT ⚠ ';