Outputz ã®ãã¼ã¸ãéãã¨ããã®æ¥ã®ã¢ã¦ããããéãtwitterã«æç¨¿ããã°ãªã¢ã³ï¼Outputter
ã§ãããã¼ ^o^
1åtwitterã«æç¨¿ããã¨ããã®å¾1æéã¯Outputzã«ã¢ã¯ã»ã¹ãã¦ãtwitterã¸ã¯æç¨¿ããã¾ããã
ããã§ã¿ããªã«ã¢ã¦ããããéãèªæ ¢ã§ãã¾ããï¼ï¼ï¼
// ==UserScript== // @name outputter // @namespace http://d.hatena.ne.jp/hayamiz/ // @include http://outputz.com/daily // ==/UserScript== function parsecookie(){ var str = document.cookie; if (str.search(/lastupdate=\d+/) == -1){ return 0; } else { var str = String(str.match(/lastupdate=\d+/)); str = String(str.match(/\d+/)); return parseInt(str); } } function modifycookie(timestamp){ var str = document.cookie; if (str.search(/lastupdate=\d+/) != -1){ str.replace(/lastupdate=\d+/, "lastupdate=" + String(timestamp)); } else { str = str + "; lastupdate=" + String(timestamp); } document.cookie = str; return; } (function (){ var status = "仿¥ã® Outputz: "; var ret = document.evaluate("//p[@class='paper']", document, null, 7, null); if (ret.snapshotLength < 1) return; var paper = ret.snapshotItem(0).innerHTML.replace(/<[^>]*>/g, ''); status = status + paper + " --- Outputz : http://outputz.com/"; var now = (new Date()).getTime(); var lastupdate = parsecookie(); if (!(now - lastupdate > 1000*60*60)){ return; } document.cookie = "lastupdate=" + String(now) + ";" GM_xmlhttpRequest({ method: "POST", url: "http://twitter.com/statuses/update.json", data: "status=" + encodeURIComponent(status), headers: {"Content-Type": "application/x-www-form-urlencoded"} }); })();