/
_pentadactylrc
323 lines (302 loc) · 13.1 KB
/
_pentadactylrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
""" Start up
map <C-r> -ex rehash
map <C-S-r> -ex restart +purgecaches
set! browser.newtabpage.enabled=false
set! browser.privatebrowsing.dont_prompt_on_enter=true
set! browser.sessionstore.restore_pinned_tabs_on_demand=true
set! browser.shell.checkDefaultBrowser=false
set! browser.startup.homepage=about:blank
set! browser.startup.page=3
set! downbar.function.firstRun=false
set! extensions.dactyl.first-run=false
set! extensions.firebug.showFirstRunPage=false
set! extensions.foxyproxy.firstrun=false
set! general.warnOnAboutConfig=false
set! security.warn_viewing_mixed=false
set! toolkit.telemetry.prompted=2
""" Input
map A -ex dialog about
map s <C-c>
map <C-space> <C-d>
map <C-S-space> <C-u>
map <C-$> -ex tabmove $
set activate-=diverted,links,tabopen,paste
set complete=location,search
set newtab=help
set hintkeys=$.aoeupjxyidhtnmz
set nextpattern^=›
set urlseparator=' , '
set! browser.backspace_action=0
set! browser.link.open_newwindow=3
set! devtools.gcli.enable=true
set! layout.spellcheckDefault=0
set! middlemouse.contentLoadURL=false
set! ui.key.contentAccess=4
set! ui.key.menuAccessKey=0
""" Display
set guioptions+=c
set showstatuslinks=command
set hlfind
set pageinfo=fgmse
set! browser.anchor_color="#6c71c4"
set! browser.display.background_color="#fdf6e3"
set! browser.display.foreground_color="#657b83"
set! browser.display.use_system_colors=false
set! browser.fullscreen.autohide=false
set! browser.tabs.closeButtons=2
set! general.smoothScroll=false
set! font.default.x-western="sans-serif"
if /NT 6\.1/.test(navigator.oscpu)
set! font.name.monospace.x-western=Consolas
set! font.name.sans-serif.x-western=Calibri
set! font.name.serif.x-western=Cambria
fi
""" Extension
if services.browserSearch.currentEngine.searchForm != "https://duckduckgo.com"
tabopen https://addons.mozilla.org/en-US/firefox/addon/duckduckgo-ssl/
tabopen https://duckduckgo.com/settings.html?kp=-1&kl=wt-wt&kh=1&#load
else
set defsearch=duckduckgo
set! browser.search.defaultenginename="DuckDuckGo"
fi
set! capability.policy.yesscript.sites="http://www.bluescreenofawesome.com http://www.cracked.com http://www.escapistmagazine.com http://www.salon.com"
set! downbar.display.clearButton=true
set! downbar.display.mainButton=false
set! downbar.display.speed=false
set! downbar.display.toMiniButton=true
set! downbar.function.clearFiletypes=""
set! downbar.function.removeOnOpen=false
set! downbar.function.soundCompleteIgnore="torrent"
set! downbar.function.soundOnComplete=1
set! downbar.style.speedColor0="0;#dc322f"
set! downbar.style.speedColor1="50;#b58900"
set! downbar.style.speedColor2="100;#859900"
set! downbar.style.speedColor3="200;#2aa198"
set! downbar.style.speedColorsEnabled=true
set! downbar.style.useGradients=false
set! extensions.checkCompatibility.nightly=false
set! extensions.https_everywhere._observatory.alt_roots=true
set! extensions.https_everywhere._observatory.enabled=true
set! extensions.https_everywhere._observatory.priv_dns=true
set! extensions.testpilot.alwaysSubmitData=true
set! extensions.testpilot.popup.showOnNewResults=true
set! extensions.testpilot.popup.showOnNewStudy=true
set! flashblock.whitelist="youtube.com,s.ytimg.com/yt,oglaf.com,a.vimeocdn.com,b.vimeocdn.com"
set! services.sync.engine.adblockplus=true
if prefs.get('services.sync.client.name') == 'cenbaz'
set! extensions.foxyproxy.settings=file:///H:/Public/hdhoang/app-config/foxyproxy.xml
elif prefs.get('services.sync.client.name') == 'cenba'
set! extensions.foxyproxy.settings=file:///home/hdhoang/Public/hdhoang/app-config/foxyproxy.xml
fi
""" Core
set editor='emacsclient +<line> <file>'
set! app.update.enabled=false
set! browser.download.manager.alertOnEXEOpen=false
set! browser.download.manager.scanWhenDone=false
set! browser.preferences.instantApply=true
set! intl.charset.default=UTF-8
set! network.http.pipelining=true
set! network.http.pipelining.ssl=true
set! network.http.spdy.enabled=true
set! network.protocol-handler.expose.magnet=false
set! services.sync.engine.prefs=false
set! toolkit.telemetry.enabled=true
bmark -keyword ac about:config
bmark -keyword st about:sync-tabs
bmark -keyword p https://en.wikipedia.org/wiki/Well-known_ports
bmark -keyword bgp http://bgp.he.net/search?search[search]=%s
bmark -keyword v http://vlasisku.lojban.org/?query=%s
bmark -keyword 1 https://blip.tv/Nebu1a#EpisodeArchive
bmark -keyword lp http://lparchive.org/search/%s#results
bmark -keyword ix -post f:1=%s http://ix.io/
bmark -keyword io http://ix.io/%s/
bmark -keyword i https://ca.isohunt.com/lite/#p=1&s=seeds&q=%s
bmark -keyword b https://btdigg.org/search?q=%s
bmark -keyword d http://beta.demonoid.me/files/?query=%s
bmark -keyword m http://mp3.zing.vn/tim-kiem/bai-hat.html?q=%s
bmark -keyword ma http://musicbrainz.org/search?advanced=1&type=artist&tport=8000&query=%s
bmark -keyword mg http://musicbrainz.org/search?advanced=1&type=release_group&tport=8000&query=%s
bmark -keyword mr http://musicbrainz.org/search?advanced=1&type=recording&tport=8000&query=%s
" thanks to Un-UTM Location Bar by Bruno Barão at https://www.userscripts.org/scripts/show/93825
" and dactyl by Kris Maglione with https://code.google.com/p/dactyl/source/detail?r=15b2632ff06e72e863d80fba5df9f3b037b94a06 for the code
autocmd DOMLoad (utm|wa)_ -js win.history.replaceState("Remove trackers", '', doc.location.href.replace(/&?(utm|wa)_[^&]+/g,'').replace(/\?$/,''))
bmark -keyword t http://hb4pm4eznzhd6mts.onion/pe/train.php
bmark -keyword at http://hb4pm4eznzhd6mts.onion/pe/async/asynctrain.php
bmark -keyword sp http://hb4pm4eznzhd6mts.onion/pe/stat.php?personal=1
" trigger on PageLoad so that the password is filled in
autocmd PageLoad (hb4pm4eznzhd6mts\.(onion|tor2web\.org)|yape\.(i2p|i2p\.tin0\.de|mooo\.com))/.+train\.php -javascript <<EOS
try {
doc.querySelector('#good button, [value="Good"]').accessKey='e';
doc.querySelector('#bad button, [value="Bad"]').accessKey=',';
doc.querySelector('select').accessKey='u'
} catch (e if e instanceof TypeError) {
doc.querySelector('[value="Login"]').form.submit()
}
EOS
autocmd DOMLoad (hb4pm4eznzhd6mts\.(onion|tor2web\.org)|yape\.(i2p|i2p\.tin0\.de|mooo\.com))/pe/train.php -javascript <<EOS
try {
doc.querySelector('[value="Good"]').accessKey='e';
doc.querySelector('[value="Bad"]').accessKey=',';
} catch (e){}
EOS
style -n "yape space" (hb4pm4eznzhd6mts\.(onion|tor2web\.org)|yape\.(i2p|i2p\.tin0\.de|mooo\.com))/.+train\.php <<EOS
html { overflow-x: hidden; position: relative; height: 100%; }
:-moz-any(table,script)+table img { margin-right: 50%; position: absolute; max-width: 100%; max-height: -moz-calc(100% - 40px) }
[value="Good"] { float: left }
body { margin: 0 }
td { padding: 0 !important }
body > a, h1, a+p
, [name=width], [name=height]
, #settings td>:not(select), [type='text']
{ display: none }
EOS
set! browser.contentHandlers.auto.application/vnd.mozilla.maybe.feed=http://fusion.google.com/add?feedurl=%s
set! browser.feeds.handler=reader
set! browser.feeds.handler.default=web
set! browser.feeds.handlers.webservice=http://fusion.google.com/add?feedurl=%s
autocmd PageLoadPre http://www.google.com/ig/add?feedurl=* -js <<EOS
doc.location.replace(doc.location.href.replace('/ig/add?feedurl=',
'/reader/view/#stream/feed/'))
EOS
bmark -keyword gm https://mail.google.com/mail/#inbox -tags n
set passkeys+=mail.google.com/mail/:'#!ms+-/? jknpu'
bmark -keyword gr https://www.google.com/reader/view/ -tags n
bmark -keyword g/ https://www.google.com/reader/view/#search/%22%s%22//user%2F-%2Fstate%2Fcom.google%2Fread
bmark -keyword gt https://www.google.com/reader/view/#stream/user/-/label/%s
bmark -keyword ge https://www.google.com/reader/view/#stream/user/-/state/com.google/itemrecs/en
bmark -keyword gs https://www.google.com/reader/view/#stream/user/-/state/com.google/starred
bmark -keyword ga https://www.google.com/reader/view/#stream/user/-/state/com.google/reading-list
set passkeys+='https://www.google.com/reader/view/*':'vf/? npSsmrgeUNPXO'
js services.permissions.add(services.io.newURI("http:www.google.com",null,null), 'popup', services.permissions.ALLOW_ACTION)
autocmd DOMLoad https://www.google.com/reader/view/* -js <<EOS
let container = doc.getElementById("viewer-entries-container");
container.tabIndex = "-1";
container.accessKey = "o";
container.focus();
EOS
style -n "greader popping" https://www.google.com/reader/view/* <<EOS
#viewer-entries-container:focus { outline: none }
.entry-actions { display: block !important }
#chrome-fullscreen-top-toggle, .email, .read-state { display: none !important }
EOS
bmark -keyword gp https://plus.google.com/
set passkeys+=plus.google.com:'jk'
map + -js <<EOS
dactyl.open(["https://plusone.google.com/_/+1/fastbutton?url=" + encodeURIComponent(content.location.href)
,"https://plusone.google.com/_/+1/confirm?url=" + encodeURIComponent(content.location.href)]
,{ from: 'links', where: dactyl.NEW_TAB })
EOS
autocmd PageLoadPre plusone.google.com/_/.+\.onion%2F -js <<EOS
doc.location.search = doc.location.search.replace('onion','tor2web.org')
EOS
style -n "link colors" * :visited { color: #d33682 !important } :link[href^="#"] { color: #268bd2 !important }
style -n "gif decor" * <<EOS
:-moz-any(
[src*="forgifs"]
, [src*="fukung"]
, [src*="imgur"]
, [src*="kuvaton"]
, [src*="myconfinedspace"]
, [src*="tumblr"]
)[src$=".gif"] { border-right: 2px dotted #d33682 !important}
EOS
style -n "titled image decor" * <<EOS
img[title]:not(:-moz-any(
[src*='anticscomic.com/']
, [src*='buttersafe.com/']
, [src*='calmblueoceans.com/']
, [src*='chainsawsuit.com/']
, [src*='channelate.com/']
, [src*='e-merl.com']
, [src*='endlessorigami.com/']
, [src*='happletea.com/']
, [src*='johnnywander.com/']
, [src*='lastplacecomics.com/']
, [src*='neatorama.com/']
, [src*='pbfcomics.com/']
, [src*='pidjin.net/']
, [src*='ribbonfarm.com/']
, [src*='robbieandbobby.com/']
, [src*='rockpapercynic.com/']
, [src*='satwcomic.com/']
, [src*='savagechickens.com/']
, [src*='shoeboxblog.com/']
, [src*='tedmccagg.typepad.com/']
, [src*='terminally-incoherent.com/']
, [src*='thebadchemicals.com/']
, [src*='todayifoundout.com/']
, [src*='upup-downdown.com/']
))
{ outline: 2px dashed #6c71c4; outline-offset: 1px }
img[title=""] { outline: none !important }
EOS
style -n "link decor: good hosts" * <<EOS
[href*="depositfiles.com/"] /* clean UI, reasonable waiting */
, [href*="hotfile.com/"]
, [href*="ifile.it"]
, [href*="mediafire.com/"],[href*="mfi.re/"]
, [href*="megashare.com/"]
, [href*="rapidshare.com/"]
, [href*="youporn.com/"] /* download links */
{ text-decoration: overline !important; -moz-text-decoration-style: wavy !important }
EOS
style -n "link decor: bad hosts" * <<EOS
[href*="fileserve.com/"] /* slow UI */
, [href*="filesmonster.com/"] /* bad UI and splits big files */
, [href*="filesonic.com/"] /* horrid UI */
, [href*="megaupload.com/"]
, [href*="oron.com/"] /* 60s */
, [href*="uploading.com/"] /* 60s */
{ text-decoration: line-through !important; -moz-text-decoration-style: wavy !important }
EOS
style -n "link decor: youtube-dl" * <<EOS
:-moz-any(
[href*="blip.tv/"]
, [href*="collegehumor.com/video/"]
, [href*="dailymotion."][href*="/video/"]
, [href*="escapistmagazine.com/videos/view/"]
, [href*="infoq.com/"]
, [href*="mixcloud.com/"]
, [href*="mtv.com/videos/"]
, [href*="soundcloud.com/"]
, [href*="viddler.com/"]
, [href*="vimeo.com/"]
, [href*="xvideos.com/video"]
, [href*="youtu.be/"],[href*="youtube.com/watch?"]
)::after { content: "\21af" }
EOS
style -n "link decor: ignco" ignorethecode.net :link { text-decoration: underline !important }
style -n "link decor: dansdata" www.dansdata.com a:not([href^="http"])::after { content: "\22c6" }
style -n "link decor: people" * <<EOS
:-moz-any(
[href*="/~cks/"]
, [href*="apenwarr.ca/"]
, [href*="//girtby.net/"]
, [href*="ignorethecode.net/"]
, [href*="pixelbeat.org/"]
, [href*="//plasmasturm.org/"]
, [href*="plover.com/"]
, [href*="shamusyoung.com/"]
)::after { content: "\22c6" }
EOS
style -n "link decor: WP" * [href*=".wikipedia.org/"]::before { content: url(https://secure.wikimedia.org/favicon.ico) }
style -n "link decor: cracked" * <<EOS
[href*="cracked.com/"]::before { content: url(http:/www.cracked.com/favicon.ico) }
@-moz-document domain("cracked.com") {
[href*="cracked.com/"]::before { content: none }
[role="main"] .body section [href*="cracked.com/"]::before { content: url(http:/www.cracked.com/favicon.ico) }
}
EOS
style -n "link decor: tvtropes" * <<EOS
[href*="tvtropes.org/"]::before { content: url(http://tvtropes.org/favicon.ico) }
@-moz-document domain("tvtropes.org") {
[href*="tvtropes.org/"]::before { content: none }
}
EOS
style -n "tvtropes spoiler" tvtropes.org .spoiler { color: grey !important } .spoiler a { color: teal !important } a { text-decoration: underline !important }
style -n "lparchive" lparchive.org body { width: auto !important } [src$=".gif"] { border-right: 2px dotted #d33682 !important}
style -n "isohunt" isohunt.com .listing { margin-right: 0 !important; background-color: white !important }
style -n "cracked" cracked.com .Body, .body { padding-left: 0 !important }
style -n "lastfm popover" last.fm iframe {height: 100px !important}
style -n "girtby" girtby.net a { text-decoration: underline !important }
" vim: set ft=pentadactyl: