Skip to content

Instantly share code, notes, and snippets.

@arantius
arantius / gm1869.user.js
Created February 11, 2014 20:25
Exercise GM bug 1869
// ==UserScript==
// @name Crash GM + FF 27
// @author Rob W <gwnRob@gmail.com>
// @namespace robwu.nl
// @version 3.7.1
// @include *
// @grant GM_getValue
// ==/UserScript==
setTimeout(function() {
@arantius
arantius / callback-stubber.user.js
Last active August 29, 2015 13:58
test for Greasemonkey #1904
// ==UserScript==
// @name callback stubber
// @namespace x
// @include http://localhost/cb.html
// @version 1
// @grant none
// ==/UserScript==
unsafeWindow.cb = function(a) { console.log('script cb', a); }
@arantius
arantius / settimeout-test.user.js
Created July 31, 2014 14:37
Test for Greasemonkey issue #1921
// ==UserScript==
// @name setTimeout parameter test
// @include http*
// @grant GM_log
// ==/UserScript==
function countdown(remaining) {
document.title = remaining + " seconds left until reload";
if (remaining <= 0) {
window.location.reload();
@arantius
arantius / gist:465f5eae91275fcc007b
Created December 19, 2014 00:10
cygwin startx log
$ startxwin
Welcome to the XWin X Server
Vendor: The Cygwin/X Project
Release: 1.16.2.0
OS: CYGWIN_NT-6.1 kook 1.7.33-2(0.280/5/3) 2014-11-13 15:47 x86_64
OS: Windows 7 Service Pack 1 [Windows NT 6.1 build 7601] (Win64)
Package: version 1.16.2-1 built 2014-11-11
XWin was started with the following command line:
@arantius
arantius / pile-of-youtube.html
Created June 17, 2015 19:14
A big pile of YouTube embedded videos, for testing.
<iframe src="https://www.youtube.com/embed/1kFNYuteAjA?showinfo=0"></iframe>
<iframe src="https://www.youtube.com/embed/2C4RvHpIbi0?showinfo=0"></iframe>
<iframe src="https://www.youtube.com/embed/841OAVjn8C0?showinfo=0"></iframe>
<iframe src="https://www.youtube.com/embed/AyLO3jMuPXk?showinfo=0"></iframe>
<iframe src="https://www.youtube.com/embed/B77RIwr4F60?showinfo=0"></iframe>
<iframe src="https://www.youtube.com/embed/BrZ5U6jg8xs?showinfo=0"></iframe>
<iframe src="https://www.youtube.com/embed/bwpTQENuVrg?showinfo=0"></iframe>
<iframe src="https://www.youtube.com/embed/bWXazVhlyxQ?showinfo=0"></iframe>
<iframe src="https://www.youtube.com/embed/bzJFExeH6pg?showinfo=0"></iframe>
<iframe src="https://www.youtube.com/embed/d0HB8ybKJzo?showinfo=0"></iframe>
// ==UserScript==
// @name Title Mutation Logger
// @version 1
// @include *
// @grant none
// @run-at document-start
// ==/UserScript==
console.log('user script mutation observer setup ...');
console.log(document.documentElement.innerHTML);
// ==UserScript==
// @name GM_rmc Test 1
// @namespace https://github.com/arantius
// @include http*
// @version 1
// @grant GM_registerMenuCommand
// @run-at document-start
// ==/UserScript==
dump('GM_rmc Test 1\n');
// ==UserScript==
// @name Bug 1192821 test
// @namespace https://arantius.com/misc/greasemonkey
// @include https://bugzilla.mozilla.org/show_bug.cgi?id=1192821
// @version 1
// @grant GM_log
// ==/UserScript==
GM_log("Location hack test...");
location.assign(
// ==UserScript==
// @name DOMNodeInserted Test
// ==/UserScript==
GM_setValue('test', 'works');
document.body.addEventListener('DOMNodeInserted', function(event) {
var access=GM_getValue('test', 'FAILS!!');
if ('undefined'==typeof access) access='FAILS!!';
// ==UserScript==
// @name Event Handler API Access Test
// ==/UserScript==
GM_setValue('test', 'works');
var console=document.getElementById('console');
console.value='';
function log(str) {
console.value=str+'\n'+console.value;