Skip to content

Instantly share code, notes, and snippets.

@altnight
Created March 6, 2012 14:37
Show Gist options
  • Save altnight/1986614 to your computer and use it in GitHub Desktop.
Save altnight/1986614 to your computer and use it in GitHub Desktop.
Togetherの「続きを読む」を自動で展開
// ==UserScript==
// @name auto page more load for toggeter
// @description Togetterの続きを読むを自動的に表示する
// @include http://togetter.com/li/*
// @namespace http://twitter.com/altnight
// @author altnight
// @version 0.0.1
// ==/UserScript==
(function(){
//「続きを読む」の要素を取ってくる
//var ele = document.getElementsByClassName("comment_btn")[1];
var ele = document.querySelectorAll(".comment_btn[onclick^='tgtr.more']")[0];
//MouseEventを作る
var ev = document.createEvent("MouseEvents");
//clickで初期化
ev.initEvent("click", false, false);
//Eventの実行
ele.dispatchEvent(ev);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment