11
13
2013
2

GM 脚本:清除 Google Groups 中的翻译提示

本文来自依云's Blog,转载请注明。

终于忍受不了 Google Groups 网页里到处都是的「将本帖翻译成中文」提示了——

// ==UserScript==
// @name           Google Group 清理
// @namespace      http://lilydjwg.is-programmer.com/
// @description    不用将帖子翻译成中文……
// @include        https://groups.google.com/*
// @grant      none
// ==/UserScript==

function doit() {
  console.log('cleaning up...');
  var divs = document.evaluate('//div[@class="gux-confirm-panel-c"]/div/a[@class="GFLL15SM5B"]/parent::div/parent::div', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);

  for(var i=0, len=divs.snapshotLength; i<len; i++){
    var div = divs.snapshotItem(i);
    div.parentNode.removeChild(div);
  }
}

var timer;

document.body.addEventListener('overflow', function(e){
  if(timer){
    clearTimeout(timer);
  }
  timer = setTimeout(doit, 500, false);
});

点击安装备用地址

Category: 火狐 | Tags: google 火狐 GreaseMonkey | Read Count: 7956
FateSpear 说:
Nov 13, 2013 04:35:06 PM

有什么好的技术group推荐吗,除了TL

Avatar_small
依云 说:
Nov 13, 2013 06:27:05 PM

shlug? python-cn? archlinux-cn? vim-cn?


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter

| Theme: Aeros 2.0 by TheBuckmaker.com