Skip to content

Instantly share code, notes, and snippets.

@uniacid
Last active August 29, 2015 14:11
Show Gist options
  • Save uniacid/a9910749183e81805cc4 to your computer and use it in GitHub Desktop.
Save uniacid/a9910749183e81805cc4 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name haaretz
// @namespace http://www.haaretz.co.il
// @description redirects haaretz to webcace
// @include http://www.haaretz.co.il/*
// @include http://webcache.googleusercontent.com/*
// @version 1
// @grant none
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// ==/UserScript==
//allow pasting
var webCache = 'http://webcache.googleusercontent.com/search?q=cache:',
oldUrlPath = window.location.href,
newURL = webCache + oldUrlPath;
if (window.location.host != 'webcache.googleusercontent.com')
window.location.replace(newURL);
else {
$('div.modal-wrapper.modal-wrapper--fixed.modal-wrapper--dark').css({'display':'none'});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment