Skip to content

Instantly share code, notes, and snippets.

arantius arantius

Block or report user

Report or block arantius

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View dhd.xml
<?xml version='1.0' encoding='UTF-8'?>
<rss version="2.0">
<pubDate>Tue, 09 May 2017 00:00:00 +0000</pubDate>
<lastBuildDate>Sat, 28 Dec 2019 17:34:53 -0500</lastBuildDate>
View everything-red.css
* { color: red !important; }
arantius / gm-get-set-demo-with-polyfill.user.js
Last active May 2, 2018
A simple persistent value test user script
View gm-get-set-demo-with-polyfill.user.js
'use strict';
// ==UserScript==
// @name GM set/get demo
// @description Exercises both GM.getValue() and GM.getValue(). Logs a counter which goes up by one, at each page load.
// @grant GM.getValue
// @grant GM_getValue
// @grant GM.setValue
// @grant GM_setValue
// @require
// ==/UserScript==
View gm-addstyle.js
function GM_addStyle(aCss) {
'use strict';
let head = document.getElementsByTagName('head')[0];
if (head) {
let style = document.createElement('style');
style.setAttribute('type', 'text/css');
style.textContent = aCss;
return style;
arantius / long-name-no-space.user.js
Created Jan 26, 2018
User scripts with long @name values.
View long-name-no-space.user.js
// ==UserScript==
// @name This_user_script_has_a_terribly_long_name_and_is_likely_to_break_UI_that_hasn't_been_crafted_specifically_to_handle_long_names.
// @grant none
// ==/UserScript==
// No_op.

Check out this repository/download this ZIP. Run:

$ npm i --save-dev
$ npm test

> sinon-chrome-webext-test@0.0.1 test /.../sinon-chrome-webext-test
> karma start karma.conf.js

Firefox 57.0.0 (Ubuntu 0.0.0) ERROR
  ReferenceError: browser is not defined
arantius /
Last active Mar 8, 2020
Serves a user script, slowly
#!/usr/bin/env python
import time
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
PORT = 8000
USER_JS = """// ==UserScript==
// @name Red Border
arantius / red-border.user.js
Created Sep 7, 2017
A super simple user script with an unobtrusive way of being clear that it's running.
View red-border.user.js
// ==UserScript==
// @name Red Border
// @description A super simple user script with an unobtrusive way of being clear that it's running.
// @namespace test
// @include http*
// @version 1
// @grant none
// ==/UserScript== = '3px dashed red';
View warnings.txt
C:\Users\t-bone\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp: In function 'int ax_port_read(int, uint8_t*, size_t)':
C:\Users\t-bone\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp:539:53: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if (!_client || _client->state() != ESTABLISHED && !_client->getSize()) {
C:\Users\t-bone\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266mDNS\ESP8266mDNS.cpp: In member function 'void MDNSResponder::_parsePacket()':
View GM_[gs]etValue_Bench.user.js
// ==UserScript==
// @name GM_[gs]etValue Bench
// @namespace
// @description Test performance of lots of get/set value calls.
// @include http:*
// @version 1
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_deleteValue
// ==/UserScript==
You can’t perform that action at this time.