欢迎光临

木子屋

标题: GreaseMonkey脚本：Google Real Link

作者: dnawo

日期: 2012-05-07 07:37 PM

分类: 操作系统

内容: 复制内容到剪贴板 程序代码// ==UserScript==
// @name Google Real Link
// @namespace http://userscripts.org/scripts/show/125473
// @description Disable the Google search rewrite, always showing and using the real, original, direct link URLs, to stop being tracked, also to prevent from using redirected pages that might be temporarily unavailable in some area. See: http://userscripts.org/scripts/show/125473
// @include http://www.google.*/*
// @include https://www.google.*/*
// @include https://encrypted.google.*/*
// @updateURL https://userscripts.org/scripts/source/125473.meta.js
// @downloadURL https://userscripts.org/scripts/source/125473.user.js
// @version 1.1
// @author tomchen1989
// @license MIT/Expat license
// ==/UserScript==
function addEventCompatible(obj, evt, fn){
if (obj.addEventListener) {//W3C
obj.addEventListener(evt, fn, false);
} else if (obj.attachEvent) {//IE
obj.attachEvent("on" + evt, fn);
}
}
function getWindow(windowObjName) {//works after window[windowObjName] loaded
if (typeof(unsafeWindow) !== "undefined" && typeof(unsafeWindow[windowObjName]) !== "undefined") {//Greasemonkey
return unsafeWindow;
} else if (typeof(window[windowObjName]) !== "undefined") {//Opera, etc.
return window;
} else {
try {//Google Chrome
var div = document.createElement("div");
div.setAttribute("onclick", "return window;");
var windowCompatible = div.onclick();
if (typeof(windowCompatible[windowObjName]) === "undefined") {
return false;
} else {
return windowCompatible;
}
} catch (e) {
return false;
}
}
}
addEventCompatible(window, "load", function() {
if (getWindow("rwt")) {
getWindow("rwt").rwt = function () {}
}
})
兼容于Firefox等浏览器的Greasemonkey、Scriptish等扩展插件、原生的Google Chrome和Opera等浏览器、IE的IE7Pro或其他支持用户脚本的插件。

+ 查看当前日志评论 (0)

登录

────────────

木子屋

PJBlog3 v3.2.9.518 Inside.

Processed In 0.711 ms

返回

标题: GreaseMonkey脚本：Google Real Link

你没有权限发表评论

────────────

木子屋

PJBlog3 v3.2.9.518 Inside.

Processed In 0.711 ms

返回

暂无评论

返回

────────────

木子屋

PJBlog3 v3.2.9.518 Inside.

Processed In 0.727 ms

返回