twitterのタイムラインをIDでフィルターする

タイムライン上にFF13の感想等がでるのがいやーなので
IDでフィルターしてしまうことにしましたすみません。
ネタバレ苦手なんですすみません。


って思ったけどこれニコニコかんけーねーなすみません。

しかも数分ためしてすでに使い物にならねーと思いましたすみません。

// ==UserScript==
// @name           twitter_filter
// @namespace      twitter
// @include        http://twitter.com/
// ==/UserScript==

//config
var ng_id_list = ["oscdis"]

//logic
function eval_xpath(rcv, doc, xpath){
  return rcv.evaluate(xpath, doc, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
}

function doc_xpath(xpath){
  return eval_xpath(document, document, xpath);
}

function ary_xpath(xpath){
  var ret = [];
  var a = doc_xpath(xpath);
  for (var i = 0; i < a.snapshotLength; i++){
    ret.push(a.snapshotItem(i));
  }
  return ret;
}

function ancestor(node, i){
  return i==0 ? node : ancestor(node.parentNode, i-1);
}

function is_ng_id(id){
  for (var i = 0; i < ng_id_list.length; i++){
    if (ng_id_list[i] == id) return true;
  }
  return false;
}

//main

var a = ary_xpath(&#39;//span[@class="status-body"]/strong/a&#39;);

for (var i = 0; i < a.length; i++){
  if (is_ng_id(a[i].text)){
    var li = ancestor(a[i], 3)
    li.parentNode.removeChild(li);
  }
}