By Raycast
—
Last update
Nov 1, 2007
—
Installed
1,605 times.
// ==UserScript==
// @name Sharebee usability
// @namespace http://heaven.universe/
// @description Remove some usabilly annoyance of sharebee: make links into real links
// @include http://sharebee.com/
// ==/UserScript==
var reg = /window\.open\('([^']*)'\);/;
var allLinks, thisLink;
allLinks = document.evaluate(
"//a[@onclick]",
document,
null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
null);
for (var i = 0; i < allLinks.snapshotLength; i++) {
thisLink = allLinks.snapshotItem(i);
var onclick = thisLink.getAttribute("onclick");
var hits = reg.exec(onclick);
if (hits && hits.length >= 1) {
thisLink.setAttribute("href", hits[1]);
thisLink.removeAttribute("onclick");
}
}