Skip to content

Instantly share code, notes, and snippets.

@saihtaM
Last active August 29, 2015 14:08
Show Gist options
  • Save saihtaM/b667a0f5d08a16633f3b to your computer and use it in GitHub Desktop.
Save saihtaM/b667a0f5d08a16633f3b to your computer and use it in GitHub Desktop.
These are my public userscripts - Click on "Raw" to install. They have all been tested with Greasemonkey for Firefox https://addons.mozilla.org/us/firefox/addon/greasemonkey/ - If enabled, they will auto update when I fix things.
// ==UserScript==
// @name KomogVind.dk Remove non-vip game loading wait times.
// @namespace http://www.komogvind.dk
// @description Fjerner banner reklamen, og sørger for at spillet indlæser hurtigst muligt.
// @downloadURL https://gist.githubusercontent.com/saihtaM/b667a0f5d08a16633f3b/raw/komogvind_nowait.user.js
// @icon https://i.imgur.com/6Pxv6j6.gif
// @include http://www.komogvind.dk/spil/play.php*
// @version 1.4
// ==/UserScript==
document.getElementById("bannerContainer").innerHTML = ("<div class=\"bannerContainerHeader\">Indlæser ;) Vent venligst..<span class=\"showGameTimer\"></span></div>");
game.nonVipLoadTime = 1;
Play.loadingFinished();
// ==UserScript==
// @name MarineTraffic Embed
// @namespace http://www.marinetraffic.com/
// @description Decreases the refresh wait :)
// @downloadURL https://gist.githubusercontent.com/saihtaM/b667a0f5d08a16633f3b/raw/marinetraffic_embed.user.js
// @icon http://i.imgur.com/Q6zJk2L.png
// @include http://www.marinetraffic.com/en/ais/embed/*
// @version 1.0.1
// ==/UserScript==
setTimeout(function(){
$.mtdata.refreshInterval=30;
$.mtdata.restartCountDown();
$( ".mt_logo" ).remove(); // Sorry
}, 5000); // They clearly didn't like we loaded it that fast.. lets try delaying it with 5 seconds.
// ==UserScript==
// @name Open Food Facts helper for Skabet.net
// @namespace http://*.openfoodfacts.org/
// @description Make it faster for inserting new products
// @icon http://i.imgur.com/ty2MmKG.png
// @downloadURL https://gist.githubusercontent.com/saihtaM/b667a0f5d08a16633f3b/raw/openfoodfacts_skabet.user.js
// @include http://*.openfoodfacts.org/cgi/product.pl*
// @version 1.0b
// ==/UserScript==
/* http://stackoverflow.com/questions/814613/how-to-read-get-data-from-a-url-using-javascript */
function parseURLParams(url) {
var queryStart = url.indexOf("?") + 1,
queryEnd = url.indexOf("#") + 1 || url.length + 1,
query = url.slice(queryStart, queryEnd - 1),
pairs = query.replace(/\+/g, " ").split("&"),
parms = {}, i, n, v, nv;
if (query === url || query === "") {
return;
}
for (i = 0; i < pairs.length; i++) {
nv = pairs[i].split("=");
n = decodeURIComponent(nv[0]);
v = decodeURIComponent(nv[1]);
if (!parms.hasOwnProperty(n)) {
parms[n] = [];
}
parms[n].push(nv.length === 2 ? v : null);
}
return parms;
}
var urlParams = parseURLParams(window.location.href);
if ($("#product_name").val().length == 0) {
$("#product_name").val(urlParams.product_name);
}
if ($("#quantity").val().length == 0) {
$("#quantity").val(urlParams.quantity);
}
if ($("#brands").val().length == 0) {
console.log("b "+urlParams.brands);
$("#brands").addTag(urlParams.brands);
}
// ==UserScript==
// @name Wimp.com Remove the pop
// @namespace http://www.wimp.com/
// @description Removed the freaking annoying PLEEEEEES SHARE THIS SHIT ON FACEBOOK shit
// @downloadURL https://gist.githubusercontent.com/saihtaM/b667a0f5d08a16633f3b/raw/wimp_remove-share-popup.user.js
// @icon http://i.imgur.com/bw03x7s.png
// @include http://www.wimp.com/*
// @version 1.4
// ==/UserScript==
this.$ = this.jQuery = jQuery.noConflict(true);
$( "#share-popup" ).remove();
$( ".fb-share" ).remove();
$( ".fb-like" ).remove();
$( ".fb-like2" ).remove();
$( ".fb-like-up" ).remove();
$( ".share-heading" ).remove();
$( ".social-div" ).remove();
$( ".like-menu" ).remove();
$( "#like-menu" ).remove();
$( ".more-share" ).remove();
$( ".social-buttons" ).remove();
$( "#newsletter" ).remove();
$( "#social-overlay" ).remove();
// ==UserScript==
// @name WindGURU.cz Remove name and links from print
// @namespace http://www.windguru.cz/
// @description Makes prints pretty by removing link styles and titles.
// @downloadURL https://gist.githubusercontent.com/saihtaM/b667a0f5d08a16633f3b/raw/windguru_printfix.user.js
// @icon https://i.imgur.com/MXSCr09.png
// @include http://www.windguru.cz/*/print.php*
// @version 1.4
// ==/UserScript==
this.$ = this.jQuery = jQuery.noConflict(true);
$("h3").remove();
$('.wgfcst-link').removeClass("wgfcst-link");
$('.wgfcst-fcsttab').each(function(i, obj) {
$(obj).find("tr:eq(0) td div span").remove();
$(obj).find("tr:eq(0) td div div span").remove();
$(obj).find("tr:eq(2) td div div div:last").remove();
$(obj).find("tr:eq(1)").remove();
});
$('a').replaceWith(function() {
return $.text([this]);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment