From 566599adaa2b49802cd609cc330adc9620a3f0a9 Mon Sep 17 00:00:00 2001 From: Phantop Date: Sun, 19 Jul 2020 23:09:33 -0400 Subject: [PATCH] Qute: remove switchdark --- .config/qutebrowser/autoconfig.yml | 1 - .local/share/qutebrowser/userscripts/switchdark | 10 ---------- 2 files changed, 11 deletions(-) delete mode 100755 .local/share/qutebrowser/userscripts/switchdark diff --git a/.config/qutebrowser/autoconfig.yml b/.config/qutebrowser/autoconfig.yml index 6c91a7c..a0ab93d 100755 --- a/.config/qutebrowser/autoconfig.yml +++ b/.config/qutebrowser/autoconfig.yml @@ -27,7 +27,6 @@ settings: sa: spawn -u archive sb: open javascript:(function($)%7Bfunction%20htmlEscape(str)%20%7Breturn%20String(str).replace(/&/g,%20'&').replace(/%22/g,%20'"').replace(/'/g,%20''').replace(/%3C/g,%20'<').replace(/%3E/g,%20'>');%7Dvar%20resultsDiv%20=%20document.createElement('div');resultsDiv.className%20=%20'ebookdownloads';resultsDiv.innerHTML%20+=%20'%3Cstyle%20scoped=%22scoped%22%3E%20.ebookdownloads%20p%20%7B%20margin:%200%20auto;%20padding:%200.25em;%20clear:%20both;%20%7D%20.ebookdownloads%20p:hover%20%7B%20background:%20rgba(0,0,0,0.15)%20!important;%20%7D%20.ebookdownloads%20%20p:nth-child(even)%20%7B%20background:%20rgba(0,0,0,0.05);%20%7D%20.ebookdownloads%20small.downloadtags%20%7B%20%20margin-top:%200.35em;%20%7D;%20.ebookdownloads%20.downloadtitle%20%7B%20cursor:default;%20%7D%20.ebookdownloads%20.downloadlinks%20%7B%20float:%20right;%7D%3C/style%3E';$('li.work,%20li.bookmark').each(function()%20%7Bvar%20options%20=%20%7B%22include_tags%22:false%7D;var%20download_url%20=%20'http://archiveofourown.org/downloads/';var%20author%20=%20$(this).find('[rel=author]:first').text();var%20author_parts%20=%20/([a-zA-Z0-9_%5Cs%5C-]*)%5Cs?(%5C((%5Cw*?)%5C))?/.exec(author);var%20pseud%20=%20author_parts[1];if%20(%20!pseud%20)%20%7Bpseud%20=%20'Anonymous';%7D/*download_url%20+=%20pseud.substring(0,%202)%20+%20'/'%20+%20pseud%20+%20'/';*/var%20summary%20=%20$(this).find('blockquote.summary').text();summary%20=%20$.trim(htmlEscape(summary));summary%20=%20summary.replace(/%5C.(%5CS)/g,%20'.%20%5C$1');%20%20var%20$match%20=%20$('.heading%20%3E%20a:first',%20this).attr('href').match(/works%5C/(%5Cd*)%5C/?/);%20%20if%20(!$match)%20%7B%20return;%20%7Dvar%20id%20=%20$match[1];download_url%20+=%20id%20+%20'/';var%20title%20=%20$(this).find('.heading%20%3E%20a:first').text();var%20filename%20=%20title.replace(/[%5E%5Cw%20_-]+/g,%20'').replace(/%20+/g,%20'%20');filename%20=%20filename.replace(/%5E(.%7B24%7D[%5Cw.]*).*/,%20'$1');download_url%20+=%20filename;var%20results%20=%20'%3Cp%3E%3Cspan%20class=%22downloadtitle%22%20title=%22'%20+%20summary%20+%20'%22%3E'%20+%20title%20+%20'%3C/span%3E:%20%3Cspan%20class=%22downloadlinks%22%3E%3Ca%20href=%22'%20+%20download_url%20+%20'.mobi%22%3Emobi%3C/a%3E%20%3Ca%20href=%22'%20+%20download_url%20+%20'.epub%22%3Eepub%3C/a%3E%20%3Ca%20href=%22'%20+%20download_url%20+%20'.pdf%22%3Epdf%3C/a%3E%20%3Ca%20href=%22'%20+%20download_url%20+%20'.html%22%3Ehtml%3C/a%3E%3C/span%3E';if%20(%20options.include_tags%20)%20%7Bvar%20tags%20=%20'';$(this).find('.fandoms%20.tag,%20.fandom,%20.relationships').each(function()%20%7Btags%20+=%20$.trim($(this).text())%20+%20',%20';%7D);results%20+=%20'%3Cbr/%3E%3Csmall%20class=%22downloadtags%22%3E'%20+%20tags.replace(/,%5Cs$/,%20'')%20+%20'%3C/small%3E';%7Dresults%20+=%20'%3C/p%3E';resultsDiv.innerHTML%20+=%20results;%7D);$('%23workskin').append('%3Cdiv%20id=%22mass_ebook_download_modal%22%3E');window.ao3modal.show('%23mass_ebook_download_modal');window.ao3modal.setContent(resultsDiv,%20'EBook%20Downloads');%7D)(jQuery); sca: spawn -u switchadapta - scd: spawn -u switchdark sd: spawn -u open_download se: open javascript:(function()%7Btry%7Bvar%20d=document,w=window;if(!d.body%7C%7Cd.body.innerHTML=='')throw(0);var%20s=d.createElement('link'),h=d.getElementsByTagName('head')[0],i=d.createElement('div'),j=d.createElement('script');s.rel='stylesheet';s.href='//dotepub.com/s/dotEPUB-favlet.css';s.type='text/css';s.media='screen';h.appendChild(s);i.setAttribute('id','dotepub');i.innerHTML='%3Cdiv%20id=%22status%22%3E%3Cp%3EConversion%20in%20progress...%3C/p%3E%3C/div%3E';d.body.appendChild(i);j.type='text/javascript';j.charset='utf-8';j.src='//dotepub.com/j/dotepub.js?v=1.2&s=0&t=epub&g=en';h.appendChild(j);%7Dcatch(e)%7Bw.alert('The%20page%20has%20no%20content%20or%20it%20is%20not%20fully%20loaded.%20Please,%20wait%20till%20the%20page%20is%20loaded.');%7D%7D)(); sj: open javascript:(function()%7B%20let%20i%2C%20elements%20%3D%20document.querySelectorAll('body%20*')%3B%20for%20(i%20%3D%200%3B%20i%20%3C%20elements.length%3B%20i%2B%2B)%20%7B%20if(getComputedStyle(elements%5Bi%5D).position%20%3D%3D%3D%20'fixed'%20%7C%7C%20getComputedStyle(elements%5Bi%5D).position%20%3D%3D%3D%20'sticky')%7B%20elements%5Bi%5D.parentNode.removeChild(elements%5Bi%5D)%3B%20%7D%20%7D%20%7D)() diff --git a/.local/share/qutebrowser/userscripts/switchdark b/.local/share/qutebrowser/userscripts/switchdark deleted file mode 100755 index e599c51..0000000 --- a/.local/share/qutebrowser/userscripts/switchdark +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/fish -if test -e $QUTE_DATA_DIR/greasemonkey/discord.js - echo "set qt.args ["blink-settings=darkMode=4"]" >> "$QUTE_FIFO" - mv $QUTE_DATA_DIR/greasemonkey/discord.js $QUTE_DATA_DIR/greasemonkey/discord.js.bak - echo "restart" >> $QUTE_FIFO -else - echo "config-unset qt.args" >> "$QUTE_FIFO" - mv $QUTE_DATA_DIR/greasemonkey/discord.js.bak $QUTE_DATA_DIR/greasemonkey/discord.js - echo "restart" >> $QUTE_FIFO -end