Skip to content

Instantly share code, notes, and snippets.

View Orgoth's full-sized avatar
💭
I may be slow to respond.

Orgoth

💭
I may be slow to respond.
View GitHub Profile
@Orgoth
Orgoth / surferseo_content-editor_color_extender
Last active July 18, 2024 12:28
surferseo content-editor color extender, adds purple color to overfulfilled to make it more userfriendly
// ==UserScript==
// @name surferseo content-editor color extender
// @namespace http://tampermonkey.net/
// @version 2024-07-18
// @description try to take over the world!
// @author You
// @match https://app.surferseo.com/drafts/*
// @match https://app.surferseo.com/audits/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=surferseo.com
// @grant none
//PLEASE READ BELOW BEFORE USING THIS INDICATOR IN ANY WAY.
// This work is licensed under an Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/
// THIS COPYRIGHT MEANS THAT YOU ARE NOT ALLOWED TO TAKE THIS CODE AND SELL IT UNDER ANY CIRCUMSTANCES.
// YOU ARE ALLOWED TO EDIT THE CODE AS MUCH AS YOU WANT FOR PERSONAL USE, BUT IF YOU DECIDE TO PUBLISH YOUR ALTERED VERSION YOU MUST GIVE ME CREDIT.
// IF YOU DO PUBLISH AN EDITED VERSION, YOU MUST USE THE SAME COPYRIGHT AS WELL.
// NO MATTER HOW MUCH YOU ALTER THE CODE, YOU STILL CANNOT SELL IT UNDER THE RULES OF THIS COPYRIGHT.
// INFRINGEMENT OF THIS COPYRIGHT MAY RESULT IN A LAWSUIT SO PLEASE RESPECT THE RULES OF THE COPYRIGHT.
@Orgoth
Orgoth / countCSSRules.js
Last active February 24, 2016 06:23 — forked from krisbulman/countCSSRules.js
Count the number of rules and selectors for CSS files on the page. Flags up the >4096 threshold that confuses IE. — This snippet has been modified to count more than just the first level of CSSStyleRule objects within CSSMediaRule.
function countCSSRules() {
var results = '',
log = '';
if (!document.styleSheets) {
return;
}
for (var i = 0; i < document.styleSheets.length; i++) {
countSheet(document.styleSheets[i]);
}
function countSheet(sheet) {
@Orgoth
Orgoth / gist:6681553
Last active December 23, 2015 19:19
Javascript error handling without window.onerror
(function () {
var origCall = Function.prototype.call, myCaller;
var arraySlice = Array.prototype.slice;
var errRegex = /at(.*?)\((.*?):([0-9]{1,}):([0-9]{1,})\)/i;
var errReg = {
ff: /(.*?)\@(.*?)\:[0-9]{1,}/i
};
// IE 11 useragent: Mozilla/5.0 (Windows NT 6.1; Trident/7.0; SLCC2; rv:11.0) like Gecko
if( !navigator.userAgent.match(/Trident/) && navigator.userAgent.match(/FireFox/) ){