Skip to content

Instantly share code, notes, and snippets.

@superbrothers
Created April 2, 2011 14:48
Show Gist options
  • Save superbrothers/899538 to your computer and use it in GitHub Desktop.
Save superbrothers/899538 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name tiqav dev
// @namespace http://dev.tiqav.com/userscripts/tiqav_dev.user.js
// @include http://localhost:3000/*
// ==/UserScript==
(function () {
var node, imgList = document.getElementsByTagName('img');
for (var i = 0, len = imgList.length; i < len; ++i) {
node = imgList.item(i);
var src = node.getAttribute('src');
if (src.match(/^http/) === null) {
node.setAttribute('src', 'http://tiqav.com' + src);
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment