diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2018-03-05 19:06:55 +0100 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2018-03-05 19:06:55 +0100 |
commit | 95ee40fa8cdca9cff0aba033a4352fc0621a9583 (patch) | |
tree | 0d554d825e9b70d5829e515fcca7c5c259aeadd6 /crocoite/data/per-site | |
parent | d571bed665cee1af6b2212c04791a7a11f18cf7d (diff) | |
download | crocoite-95ee40fa8cdca9cff0aba033a4352fc0621a9583.tar.gz crocoite-95ee40fa8cdca9cff0aba033a4352fc0621a9583.tar.bz2 crocoite-95ee40fa8cdca9cff0aba033a4352fc0621a9583.zip |
Add generic click behavior script
Configureable. Clicks elements matching one (or more) CSS selectors once
or multiple times.
Currently supported: Facebook, Twitter, Disqus (embedded iframe)
Diffstat (limited to 'crocoite/data/per-site')
-rw-r--r-- | crocoite/data/per-site/twitter.js | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/crocoite/data/per-site/twitter.js b/crocoite/data/per-site/twitter.js deleted file mode 100644 index 2773f64..0000000 --- a/crocoite/data/per-site/twitter.js +++ /dev/null @@ -1,30 +0,0 @@ -/* Fixups for twitter: - * - Some accounts are hidden behind a “suspicious activity” message, click - * that. - * - Click “more replies” buttons periodically (as they popup when scrolling) - */ -(function(){ -function makeClickEvent () { - return new MouseEvent('click', { - view: window, - bubbles: true, - cancelable: true - }); -} -function expandThread () { - let links = document.querySelectorAll('a.ThreadedConversation-moreRepliesLink'); - for (let i = 0; i < links.length; i++) { - links[i].dispatchEvent (makeClickEvent ()); - } - return true; -} -function showProfile () { - var show = document.querySelector ("button.ProfileWarningTimeline-button"); - if (show) { - show.dispatchEvent (makeClickEvent ()); - } -} -window.addEventListener("load", showProfile); -/* XXX: can we use a mutation observer instead? */ -window.setInterval (expandThread, 1000); -}()); |