Skip to content

Instantly share code, notes, and snippets.

@arantius
arantius / update-meta-test.meta.js
Created October 17, 2012 16:38
Update and Download URL Metadata Test
// ==UserScript==
// @name Update and Download URL Metadata Test
// @version 1
// @updateURL https://gist.github.com/raw/3906612/update-meta-test.meta.js
// @downloadURL https://gist.github.com/raw/3906612/update-meta-test.user.js
// ==/UserScript==
@arantius
arantius / alert-settimeout-grant-none-test.user.js
Created September 6, 2012 14:36
Issue 1620: alert + setTimeout + grant none test
// ==UserScript==
// @name Issue 1620: alert + setTimeout + grant none test
// @namespace http://arantius.com/misc/greasemonkey
// @include https://github.com/greasemonkey/greasemonkey/issues/1620
// @include https://gist.github.com/3656920
// @version 1
// @grant GM_log
// ==/UserScript==
alert(1);
// ==UserScript==
// @name User Script Scope Test
// @namespace http://arantius.com/misc/greasemonkey
// @description Test the affect of assigning to various scopes in a script, on the content page
// @include http://jsbin.com/abemus/*
// @version 1
// @grant GM_log
// ==/UserScript==
bare_val = 'grant-ed bare';
@arantius
arantius / frame-exclusion-test.user.js
Created August 30, 2012 16:10
Greasemonkey: Frame Exclusion Test
// ==UserScript==
// @name Frame Exclusion Test
// @grant none
// @include http://jsbin.com/*
// @include http://*.greasespot.net/*
// ==/UserScript==
if (window.top !== window.self) return;
console.log('Frame Exclusion Test', location.href);
@arantius
arantius / require-jquery-test.user.js
Created August 28, 2012 13:14
require jquery test
// ==UserScript==
// @name Greasemonkey and jQuery Test D
// @namespace http://arantius.com/misc/greasemonkey
// @include http://fiddle.jshell.net/Gc8HN/*/show/
// @include http://fiddle.jshell.net/_display/
// @version 1
// @grant none
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js
// ==/UserScript==
@arantius
arantius / var-x-equals.user.js
Created August 1, 2012 16:05
Greasemonkey Variable Names Test
// ==UserScript==
// @name Var X Equals
// @namespace http://github.com/arantius
// @include http://localhost/infinite.php*
// @version 1
// @unwrap
// @grant GM_log
// ==/UserScript==
// Note @unwrap to trigger this in Greasemonkey versions before 1.0 betas.
@arantius
arantius / update-test.user.js
Created August 1, 2012 14:07
Greasemonkey Update Test
// ==UserScript==
// @name Update Test
// @namespace test
// @description Test whether updates really work
// @include *
// @version 2
// ==/UserScript==
dump('Update test version 2!\n');
function library() {
console.log('The library function defined in a @require script works!');
}
@arantius
arantius / grant-none-shim.js
Last active May 21, 2022 14:47
Greasemonkey "@grant none" compatibility shim.
/*
The MIT License (MIT)
Copyright (c) 2014 Anthony Lieuallen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
// ==UserScript==
// @name Break GMail Test
// @namespace test
// @include https://mail.google.com/*
// @include http://mail.google.com/*
// @version 1
// ==/UserScript==
var els=document.links;
for (var i=0, el; j=0, el=els[i]; i++) {