diff options
author | anekos | 2011-08-26 22:49:55 +0900 |
---|---|---|
committer | anekos | 2011-08-26 22:50:39 +0900 |
commit | bb829261fa05684ed36b016a12e09707dd205354 (patch) | |
tree | fafa01f9d78d2d5bf13fd527078f02cf91defe4e /google-plus-commando.js | |
parent | eb4abea900128ca77fd2249f25e69833347ddcc0 (diff) | |
download | vimperator-plugins-bb829261fa05684ed36b016a12e09707dd205354.tar.bz2 |
リロードしたら、ページ構成変わってるやん!!!みたいなの対応
Diffstat (limited to 'google-plus-commando.js')
-rw-r--r-- | google-plus-commando.js | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/google-plus-commando.js b/google-plus-commando.js index c5d95d9..23f9d1f 100644 --- a/google-plus-commando.js +++ b/google-plus-commando.js @@ -36,7 +36,7 @@ THE POSSIBILITY OF SUCH DAMAGE. // INFO {{{ let INFO = <> - <plugin name="GooglePlusCommando" version="2.2.3" + <plugin name="GooglePlusCommando" version="2.3.0" href="http://github.com/vimpr/vimperator-plugins/blob/master/google-plus-commando.js" summary="The handy commands for Google+" lang="en-US" @@ -1551,6 +1551,30 @@ let g:gplus_commando_map_menu = "m" // }}} + // DOMLoad Event {{{ + + // リロードしたら、ページ構成変わってるやん!!!みたいなの対応 + events.addSessionListener( + document.getElementById('appcontent'), + 'DOMContentLoaded', + function (event) { + let doc = event.originalTarget; + // XXX G+ 内の他のページへ跳ぶときは、plus.google.com を経由するが、それは除外する + if ( + doc instanceof HTMLDocument && + !doc.defaultView.frameElement && + doc.location.host === 'plus.google.com' && + doc.body && + doc.body.children.length + ) { + __context__.selector._clearCache(); + } + }, + true + ); + + // }}} + })(); // vim:sw=2 ts=2 et si fdm=marker: |