mirror of
https://github.com/Phantop/dotfiles
synced 2024-11-05 06:25:00 +00:00
qute: add more adblocking stuff w/ css
This commit is contained in:
parent
740be643af
commit
3b6c0a5cfe
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/fish
|
#!/usr/bin/fish
|
||||||
alias a 'alias -s'
|
alias a 'alias -s'
|
||||||
set -U fish_features 3.0
|
set -U fish_features 3.0
|
||||||
|
rm -r ~/.config/fish/functions
|
||||||
|
|
||||||
a acmus 'timeout --foreground (math 3600 - (date +%s) % 3600) mpv --loop https://acmusicext.com/static/$argv/sunny/(date +%-I%p|tr APM apm).ogg'
|
a acmus 'timeout --foreground (math 3600 - (date +%s) % 3600) mpv --loop https://acmusicext.com/static/$argv/sunny/(date +%-I%p|tr APM apm).ogg'
|
||||||
a aliases 'v (env which aliases); command aliases'
|
a aliases 'v (env which aliases); command aliases'
|
||||||
|
@ -46,6 +47,7 @@ a tcsv 'curl -sL http://torrents-csv.ml/service/search?q="$argv"|jq ".[]|.name,.
|
||||||
a temp 'curl temp.sh -T'
|
a temp 'curl temp.sh -T'
|
||||||
a tldrl 'curl -s https://raw.githubusercontent.com/tldr-pages/tldr/master/pages/{common,linux}/$argv.md;:'
|
a tldrl 'curl -s https://raw.githubusercontent.com/tldr-pages/tldr/master/pages/{common,linux}/$argv.md;:'
|
||||||
a transfer 'curl https://transfer.sh/(basename $argv) -T'
|
a transfer 'curl https://transfer.sh/(basename $argv) -T'
|
||||||
|
a twitch 'mpv https://twitch.tv/$argv & disown ;:'
|
||||||
a twitch-dl 'ffmpeg -i (yt-dlp -e $argv[1]|tr / _) -c copy $argv[2..-1] "file:(yt-dlp -g $argv[1]).mkv"'
|
a twitch-dl 'ffmpeg -i (yt-dlp -e $argv[1]|tr / _) -c copy $argv[2..-1] "file:(yt-dlp -g $argv[1]).mkv"'
|
||||||
a untar 'tar xf'
|
a untar 'tar xf'
|
||||||
a up 'se up --y'
|
a up 'se up --y'
|
||||||
|
|
|
@ -17,7 +17,7 @@ if not test -d $LOFI
|
||||||
fd -e flac -x opusenc --bitrate 256 {} $LOFI/{.}.opus
|
fd -e flac -x opusenc --bitrate 256 {} $LOFI/{.}.opus
|
||||||
end
|
end
|
||||||
|
|
||||||
set args -s $HIFI -d $LOFI -o opus -q 256 --clean sync -F 8 -a mp3,m4a,opus
|
set args -s $HIFI -d $LOFI -o opus -q 256 --clean sync -F 16 -c mp3,m4a,opus
|
||||||
acxi $args || wget https://github.com/smxi/acxi/raw/stable/acxi -O- -o/dev/null | perl -- - $args
|
acxi $args || wget https://github.com/smxi/acxi/raw/stable/acxi -O- -o/dev/null | perl -- - $args
|
||||||
|
|
||||||
fusermount -u $LOFI
|
fusermount -u $LOFI
|
||||||
|
|
|
@ -17,3 +17,8 @@ abp("https://github.com/brave/adblock-lists/raw/master/coin-miners.txt")
|
||||||
abp("https://github.com/brave/adblock-lists/raw/master/brave-lists/brave-firstparty-cname.txt")
|
abp("https://github.com/brave/adblock-lists/raw/master/brave-lists/brave-firstparty-cname.txt")
|
||||||
abp("https://github.com/brave/adblock-lists/raw/master/brave-lists/brave-firstparty.txt")
|
abp("https://github.com/brave/adblock-lists/raw/master/brave-lists/brave-firstparty.txt")
|
||||||
abp("https://github.com/brave/adblock-lists/raw/master/brave-lists/brave-social.txt")
|
abp("https://github.com/brave/adblock-lists/raw/master/brave-lists/brave-social.txt")
|
||||||
|
|
||||||
|
abp("https://github.com/DandelionSprout/adfilt/raw/master/LegitimateURLShortener.txt")
|
||||||
|
abp("https://github.com/DandelionSprout/adfilt/raw/master/AnnoyancesList")
|
||||||
|
abp("https://github.com/DandelionSprout/adfilt/raw/master/SocialShareList.txt")
|
||||||
|
abp("https://github.com/DandelionSprout/adfilt/raw/master/ExtremelyCondensedList.txt")
|
||||||
|
|
|
@ -6,7 +6,7 @@ config.source('javascript.py')
|
||||||
config.source('redirects.py')
|
config.source('redirects.py')
|
||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
subprocess.run(["sassc", config.configdir / 'user.scss', config.configdir / 'user.css'])
|
subprocess.run(["sass", config.configdir / 'user.scss', config.configdir / 'user.css'])
|
||||||
|
|
||||||
c.url.default_page = 'feedly.com/i/my'
|
c.url.default_page = 'feedly.com/i/my'
|
||||||
c.url.start_pages = 'covid19.rpi.edu/dailycheckin'
|
c.url.start_pages = 'covid19.rpi.edu/dailycheckin'
|
||||||
|
@ -27,7 +27,7 @@ c.colors.webpage.darkmode.policy.images = 'never'
|
||||||
c.aliases['re'] = 'restart'
|
c.aliases['re'] = 'restart'
|
||||||
c.aliases['mpv'] = 'spawn -mdv mpv --ytdl-raw-options=sub-lang=en'
|
c.aliases['mpv'] = 'spawn -mdv mpv --ytdl-raw-options=sub-lang=en'
|
||||||
c.aliases['css-reload'] = 'set content.user_stylesheets user.css'
|
c.aliases['css-reload'] = 'set content.user_stylesheets user.css'
|
||||||
c.aliases['scss-reload'] = 'spawn -u /bin/sh -c "sassc $QUTE_CONFIG_DIR/user.{s,}css"'
|
c.aliases['scss-reload'] = 'spawn -u /bin/sh -c "sass $QUTE_CONFIG_DIR/user.{s,}css"'
|
||||||
c.aliases['remove-sticky'] = 'jseval -q document.querySelectorAll("*").forEach(e=>{["sticky","fixed"].includes(getComputedStyle(e).position)&&e.parentNode.removeChild(e)})'
|
c.aliases['remove-sticky'] = 'jseval -q document.querySelectorAll("*").forEach(e=>{["sticky","fixed"].includes(getComputedStyle(e).position)&&e.parentNode.removeChild(e)})'
|
||||||
c.aliases['toggle-dark'] = 'reload;;jseval -q const meta=document.createElement("meta");meta.name="color-scheme";document.head.appendChild(meta).content="dark";;stop'
|
c.aliases['toggle-dark'] = 'reload;;jseval -q const meta=document.createElement("meta");meta.name="color-scheme";document.head.appendChild(meta).content="dark";;stop'
|
||||||
|
|
||||||
|
|
|
@ -11,3 +11,4 @@ for site in sites:
|
||||||
config.set('content.javascript.enabled', True, 'https://' + site)
|
config.set('content.javascript.enabled', True, 'https://' + site)
|
||||||
|
|
||||||
config.set('content.headers.user_agent', 'iPhone', 'docs.google.com')
|
config.set('content.headers.user_agent', 'iPhone', 'docs.google.com')
|
||||||
|
config.set('content.headers.user_agent', 'iPhone', 'drive.google.com')
|
||||||
|
|
|
@ -2,7 +2,7 @@ from qutebrowser.api import interceptor
|
||||||
import operator
|
import operator
|
||||||
|
|
||||||
invid = 'vid.puffyan.us'
|
invid = 'vid.puffyan.us'
|
||||||
nitter = 'nitter.net'
|
nitter = 'nitter.pussthecat.org'
|
||||||
reddit = 'libreddit.pussthecat.org'
|
reddit = 'libreddit.pussthecat.org'
|
||||||
|
|
||||||
o = operator.methodcaller
|
o = operator.methodcaller
|
||||||
|
@ -28,8 +28,9 @@ MAP = {
|
||||||
"www.twitch.tv" : o(s, 'm.twitch.tv'),
|
"www.twitch.tv" : o(s, 'm.twitch.tv'),
|
||||||
"discord.com" : o(s, 'canary.discord.com'),
|
"discord.com" : o(s, 'canary.discord.com'),
|
||||||
"vm.tiktok.com" : o(s, 'proxitok.herokuapp.com'),
|
"vm.tiktok.com" : o(s, 'proxitok.herokuapp.com'),
|
||||||
"en.wikipedia.org" : o(s, 'wikiless.org')
|
"en.wikipedia.org" : o(s, 'wikiless.org'),
|
||||||
}
|
"translate.google.com" : o(s, 'simplytranslate.pussthecat.org')
|
||||||
|
}
|
||||||
def f(info: i.Request):
|
def f(info: i.Request):
|
||||||
if (info.resource_type != i.ResourceType.main_frame or
|
if (info.resource_type != i.ResourceType.main_frame or
|
||||||
info.request_url.scheme() in {"data", "blob"}):
|
info.request_url.scheme() in {"data", "blob"}):
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
@import url(https://github.com/panicsteve/shutup-css/raw/master/shutup.css);
|
||||||
|
@import url(https://necolas.github.io/normalize.css/latest/normalize.css);
|
||||||
#hnmain {
|
#hnmain {
|
||||||
zoom: 120%;
|
zoom: 120%;
|
||||||
background: #212121;
|
background: #212121;
|
||||||
|
@ -27,8 +29,9 @@ body.dracula {max-width: 777pt}
|
||||||
body>nav:nth-child(1) {position: absolute}
|
body>nav:nth-child(1) {position: absolute}
|
||||||
tbody>tr>[bgcolor="#CCCCCC"] {background: #000000}
|
tbody>tr>[bgcolor="#CCCCCC"] {background: #000000}
|
||||||
div.doc-container div.doc div {max-width: 666pt !important; margin: auto}
|
div.doc-container div.doc div {max-width: 666pt !important; margin: auto}
|
||||||
|
.qute-readability {margin: auto !important}
|
||||||
|
|
||||||
p#javascript-warning {display: none}
|
p#javascript-warning, [class^=nativead] {display: none}
|
||||||
ul.work > li.download {
|
ul.work > li.download {
|
||||||
font-size: 0;
|
font-size: 0;
|
||||||
> ul {
|
> ul {
|
||||||
|
@ -37,3 +40,14 @@ ul.work > li.download {
|
||||||
> li {font-size: small; &:not(:nth-child(2)) {display: none}}
|
> li {font-size: small; &:not(:nth-child(2)) {display: none}}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$class: ad-frame-container, ad-panel, ad-slot, adsbygoogle,
|
||||||
|
adbox, adunit, adunit-wrapper, b_ad, leaderboard;
|
||||||
|
@each $i in $class {.#{$i} {display:none}}
|
||||||
|
|
||||||
|
$div: 'class*=-ad-container', 'class*=ad-wrapper', 'id*=_ad_native',
|
||||||
|
'id^=div-gpt-ad', 'id^=google_ads_', 'id^=netboard_', 'id^=skyscraper';
|
||||||
|
@each $i in $div {div[#{$i}] {display:none}}
|
||||||
|
|
||||||
|
$id: ads, leaderboard, player-ads, rc-row-container;
|
||||||
|
@each $i in $id {##{$i} {display:none}}
|
||||||
|
|
Loading…
Reference in a new issue