diff options
-rw-r--r-- | crocoite/behavior.py | 7 | ||||
-rw-r--r-- | crocoite/data/per-site/instagram.js | 21 |
2 files changed, 1 insertions, 27 deletions
diff --git a/crocoite/behavior.py b/crocoite/behavior.py index a7928e7..e4ec93b 100644 --- a/crocoite/behavior.py +++ b/crocoite/behavior.py @@ -229,15 +229,10 @@ class Twitter (HostnameFilter, JsOnload): scriptPath = 'per-site/twitter.js' hostname = ['com', 'twitter'] -class Instagram (HostnameFilter, JsOnload): - name = 'instagram' - scriptPath = 'per-site/instagram.js' - hostname = ['com', 'instagram'] - # available behavior scripts. Order matters, move those modifying the page # towards the end of available generic = [Scroll, EmulateScreenMetrics] -perSite = [Twitter, Instagram] +perSite = [Twitter] available = generic + perSite + [Screenshot, DomSnapshot] availableNames = set (map (lambda x: x.name, available)) diff --git a/crocoite/data/per-site/instagram.js b/crocoite/data/per-site/instagram.js deleted file mode 100644 index da7b5ea..0000000 --- a/crocoite/data/per-site/instagram.js +++ /dev/null @@ -1,21 +0,0 @@ -/* Fixups for instagram: searches for the “show more” button and clicks it - */ -(function(){ -function fixup () { - var links = document.querySelectorAll ("main a"); - for (var i = 0; i < links.length; i++) { - var href = links[i].getAttribute ("href"); - if (href.search (/\?max_id=\d+$/) != -1) { - var click = new MouseEvent('click', { - view: window, - bubbles: true, - cancelable: true - }); - console.log ('clicking', href); - links[i].dispatchEvent (click); - break; - } - } -} -window.addEventListener("load", fixup); -}()); |