Skip to content

Instantly share code, notes, and snippets.

View janekptacijarabaci's full-sized avatar

janekptacijarabaci

View GitHub Profile
@janekptacijarabaci
janekptacijarabaci / greasemonkey_issue_1849.user.js
Created March 21, 2018 19:46
Greasemonkey issue #1849: GM eating up all mutation events (document-start, MutationObserver)
// ==UserScript==
// @name Greasemonkey - issue - 1849
// @include http*
// @run-at document-start
// @grant none
// ==/UserScript==
var nodes = 0;
MutationObserver = window.MutationObserver;
@janekptacijarabaci
janekptacijarabaci / greasemonkey_issue_2129.user.js
Created March 8, 2018 23:00
Greasemonkey issue #2129: GM_ functions don't work when called with `apply`
// ==UserScript==
// @name Greasemonkey - issue - 2129
// @include http*://www.w3.org/
// @resource one https://wordpress.org/plugins/about/readme.txt
// @grant unsafeWindow
// @grant GM_log
// @grant GM_addStyle
// @grant GM_registerMenuCommand
// @grant GM_setValue
// @grant GM_getValue
@janekptacijarabaci
janekptacijarabaci / greasemonkey_GM[properties]_polyfill.user.js
Created February 25, 2018 02:27
Greasemonkey: GM[properties] - polyfill
// ==UserScript==
// @name Greasemonkey - GM[properties] - polyfill
// @include http*://www.palemoon.org/
// @resource one https://avatars3.githubusercontent.com/u/69631?v=3&s=80
// @noframes
// @grant GM_addStyle
// @grant GM.addStyle
// @grant GM_cookie
// @grant GM.cookie
// @grant GM_deleteValue
@janekptacijarabaci
janekptacijarabaci / GM_download_polyfill.js
Last active February 18, 2018 06:30
Greasemonkey: GM_download - polyfill
/*
* GM_download() polyfill
*
* A polyfill to make your userscript supports GM_download().
*
* Inspired by:
* https://tampermonkey.net/documentation.php?ext=dhdg#GM_download
*
* Supported:
* onabort
@janekptacijarabaci
janekptacijarabaci / greasemonkey_GM_window[Close-Focus].user.js
Created October 26, 2017 12:54
Greasemonkey: GM_window[Close-Focus]
// ==UserScript==
// @name GM_window[Close-Focus]
// @include https://github.com/
// @grant GM_windowClose
// @grant GM_windowFocus
// ==/UserScript==
// 1: GM_windowClose
// 2: GM_windowFocus
var what = 1;
@janekptacijarabaci
janekptacijarabaci / greasemonkey_GM_xmlhttpRequest_protocols.user.js
Created August 30, 2017 06:05
Greasemonkey: GM_xmlhttpRequest - blob: and data:
// ==UserScript==
// @name Greasemonkey - GM_xmlhttpRequest - blob: and data:
// @include https://github.com/
// @grant GM_xmlhttpRequest
// ==/UserScript==
var code = {
"mimeType": "text/html",
"value": "<html><head></head><body></body></html>",
};
@janekptacijarabaci
janekptacijarabaci / greasemonkey_issue_2235.user.js
Created May 1, 2017 08:12
Greasemonkey issue #2235: GM_xmlhttpRequest overwrite cookie in headers parameter
// ==UserScript==
// @name Greasemonkey - issue - 2235
// @include http://www.html-kit.com/tools/cookietester/
// @noframes
// @grant GM_log
// @grant GM_xmlhttpRequest
// ==/UserScript==
var anonymous = false;
if (confirm("Anonymous?")) {
@janekptacijarabaci
janekptacijarabaci / greasemonkey_GM_setClipboard.user.js
Created April 26, 2017 15:55
Greasemonkey - GM_setClipboard()
// ==UserScript==
// @name Greasemonkey - GM_setClipboard
// @include https://github.com/
// @grant GM_setClipboard
// ==/UserScript==
var options = new Array();
options.push(null);
options.push("text");
options.push("html");
@janekptacijarabaci
janekptacijarabaci / greasemonkey_issue_2134_2141.user.js
Created April 23, 2017 15:09
Greasemonkey issue #2134, #2141: GM_openInTab returns null, synchronize API with Tampermonkey
// ==UserScript==
// @name Greasemonkey - issue - 2134, 2141
// @include https://github.com/
// @grant GM_openInTab
// ==/UserScript==
// close() - about:config - dom.allow_scripts_to_close_windows: true
var options = new Array();
options.push(undefined);