Skip to content

Instantly share code, notes, and snippets.

@rowaasr13
rowaasr13 / text_extensions.pl
Last active January 21, 2021 14:56
text_extensions.pl - Generates list of patterns for highly compressible files.
# Generates list of patterns for highly compressible files.
# Most of them are text and formatted text - hence name.
# But some are other uncompressed formats - bitmaps, targa, uncompressed sounds, textures, etc.
use strict;
use warnings;
my @ext;
my %known;
foreach(split /[\r\n]/, '
var closest_parent_by_class = function(elem, className) { for (;elem && elem !== document; elem = elem.parentNode) if (elem.classList.contains(className)) { return elem } }
var paint_tag_q = function (tag, color) {
var list = document.querySelectorAll('.tagged-interesting a[href="/questions/tagged/'+ tag +'"]')
for (var idx = 0; idx < list.length; idx++) {
var q_block = closest_parent_by_class(list[idx], 'tagged-interesting')
q_block.style.backgroundColor = color
var parent = q_block.parentNode
parent.insertBefore(q_block, parent.firstChild)
}
}
// ==UserScript==
// @name LiveJournal: inline naspravdi iframe
// @namespace rowaasr13@gmail.com
// @include http://*.livejournal.com/*
// ==/UserScript==
//
// *************************************************************************************************************************************
// Donations https://www.paypal.com/cgi-bin/webscr?business=rowaasr13%40gmail.com&item_name=UserScripts+Development&cmd=_donations
// *************************************************************************************************************************************
(function(){function e(a,d,c,b){a=a.getElementsByTagName(d);d=a.length;if("object"===typeof b&&b.exec)for(delete f[0],delete f[1];d--;){var g=a[d],e=b.exec(g[c]);if(e)return f[0]=g,f[1]=e,f}else for(;d--;)if(g=a[d],g[c]==b)return g}var a=document,c=a.body;if("/"!=location.pathname){var f={},b=e(c,"a","href",/naspravdi\.info\//);b&&(b=b[0],c=e(c,"div","className","entry-content"))&&(a=a.createElement("iframe"),a.src=b.href,a.widt