💾 Archived View for zaibatsu.circumlunar.space › ~visiblink › phlog › 20201101 captured on 2024-07-09 at 04:25:01.

View Raw

More Information

⬅️ Previous capture (2021-12-03)

-=-=-=-=-=-=-

Lately, I've been enjoying playing around with 
greasemonkey/tampermonkey scripts. Here are a couple for 
those of you who sometimes want to surf using a modern 
browser but without all the bling of the modern web. 
Both remove images, video, etc., to a certain extent, 
but you still need a decent ad-blocker.


This one makes websites look like they're rendered in a 
terminal:

// ==UserScript==
// @name          Terminalize
// @namespace     http://userstyles.org
// @description	  The web, terminal style.
// @author        Visiblink
// @include       https://*
// @include       http://*
// @run-at        document-start
// @version       0.1
// ==/UserScript==
(function() {var css = [
  "@namespace url(http://www.w3.org/1999/xhtml);",
// Remove Visual Media Elements  
  "img {display:none !important}",
  "background-image {display:none !important}",
  "video {display:none !important}",
// Monospace Font
  "* {font-family: Courier, monospace !important; color: white !important; background-color: black !important}",
// Grayscale Everything
  "body {filter:grayscale(100%)}"
].join("\n");
if (typeof GM_addStyle != "undefined") {
	GM_addStyle(css);
} else if (typeof PRO_addStyle != "undefined") {
	PRO_addStyle(css);
} else if (typeof addStyle != "undefined") {
	addStyle(css);
} else {
	var node = document.createElement("style");
	node.type = "text/css";
	node.appendChild(document.createTextNode(css));
	var heads = document.getElementsByTagName("head");
	if (heads.length > 0) {
		heads[0].appendChild(node);
	} else {
		// no head yet, stick it whereever
		document.documentElement.appendChild(node);
	}
}
})();


This one makes sites look something like old newspapers:

// ==UserScript==
// @name          Extra!
// @namespace     http://userstyles.org
// @description	  Displays websites like old newspapers (grayscale with courier font)
// @author        Visiblink
// @include       https://*
// @include       http://*
// @run-at        document-start
// @version       0.1
// ==/UserScript==
(function() {var css = [
  "@namespace url(http://www.w3.org/1999/xhtml);",
// Remove Visual Media Elements  
  "img {display:none !important}",
  "background-image {display:none !important}",
  "video {display:none !important}",
// Monospace Font
  "* {font-family: Courier, monospace !important;}",
// Grayscale Everything
  "body {filter:grayscale(100%)}"
].join("\n");
if (typeof GM_addStyle != "undefined") {
	GM_addStyle(css);
} else if (typeof PRO_addStyle != "undefined") {
	PRO_addStyle(css);
} else if (typeof addStyle != "undefined") {
	addStyle(css);
} else {
	var node = document.createElement("style");
	node.type = "text/css";
	node.appendChild(document.createTextNode(css));
	var heads = document.getElementsByTagName("head");
	if (heads.length > 0) {
		heads[0].appendChild(node);
	} else {
		// no head yet, stick it whereever
		document.documentElement.appendChild(node);
	}
}
})();



boilerplate I found somewhere. I suppose this would have 
worked as well or better in the Stylish or Stylus 
extensions.