Compare commits

...

103 Commits

Author SHA1 Message Date
earthlng
5743fe303c 57 release 2017-11-20 13:55:02 +01:00
earthlng
89e0aed652 4600: redundant prefs due to RFP 2017-11-20 13:49:19 +01:00
earthlng
59ae0b1028 2706: *.storageManager.enabled;false => inactive
Controls the visibility of the "Options>Privacy & Security>Site Data" section.
I'd prefer to remove this completely because it only adds to the confusion about all the different storage types.
This is just an extension for localStorage (2705) with 3 methods: estimate(), persist() and persisted(). A site can ask for permission (?) to persist data which when granted basically just means that "Storage will not be cleared except by explicit user action" whereas otherwise when not persisted "Storage may be cleared by the UA under storage pressure." - I don't see a problem with that.
We'll keep 2706 inactive for now but might remove it in a future commit.
2017-11-20 13:11:55 +01:00
earthlng
69c278c3ba 2630: accessibility.force_disabled => 1
Prevent accessibility services from accessing your browser
2017-11-20 11:26:03 +01:00
earthlng
4290b4e882 Merge pull request #275 from claustromaniac/claustromaniac-patch-1
Just some polishing
2017-11-19 22:32:06 +01:00
claustromaniac
efcaa3de8a Just some polishing 2017-11-19 17:41:19 +00:00
earthlng
cdeb0abe79 update to v2.0
https://github.com/ghacksuserjs/ghacks-user.js/issues/264#issuecomment-345462158

- It can now handle read-only files.
- it is somewhat more explicit regarding what it's doing in some circumstances. For example, it now informs the user when no changes are made.
- It now accepts two parameters: `-unattended` and `-log`
- Minor improvements here and there.
2017-11-19 08:58:47 +01:00
Thorin-Oakenpants
450adab519 2706: Storage API => active false #273
Sorry, but AFAIK, with this enabled it clears web extension storage when clear "offsite website data" is checked on close or manually (which we do in the user.js). Note also that even with this enabled, the UI settings are disabled, and the data-on-disk calculation never finishes, so at this point, its a bit useless to enable it until we figure that out. Will be back in 7 days
2017-11-19 08:21:18 +13:00
earthlng
500c129d48 fix for profile detection
this should now work no matter how the script is called (including symlinks) on both Mac and Linux.
+ Storing and restoring the original working directory to prevent problems in certain circumstances.
2017-11-18 13:39:29 +01:00
Thorin-Oakenpants
7ae034a23c 2706: Storage API => inactive 2017-11-18 18:01:01 +13:00
earthlng
754ec610d1 typo 2017-11-17 15:48:39 +01:00
earthlng
fe752c8be3 Create updater.bat
thanks @claustromaniac
2017-11-17 15:45:16 +01:00
earthlng
da3ba2a97f Create updater.sh
thanks @overdodactyl !!
2017-11-17 15:26:27 +01:00
Thorin-Oakenpants
22e51e2a08 0506: disable PingCenter telemetry 2017-11-17 04:06:04 +13:00
earthlng
c6d55296fb typo
used to be 2021 not 2012, see 908a8d66f4
2017-11-16 06:46:35 +01:00
Thorin-Oakenpants
f89bb3f1c2 9999: deprecated FF57 2017-11-16 17:03:08 +13:00
Thorin-Oakenpants
64a6eb794a 0850f: disable local search history in locationbar
kinda moot considering 0860 disables all search history :) Added for completeness so users can tweak their awesomebar to their little hearts content
2017-11-16 16:27:54 +13:00
Thorin-Oakenpants
fe46ea79ce 4500: RFP MediaDevices API FF59+ 2017-11-15 16:03:42 +13:00
Thorin-Oakenpants
d256908a5f 0330: telemetry changes 58+ #271 2017-11-15 13:51:20 +13:00
Thorin-Oakenpants
dedfbf04b6 5008: syntax fixup 2017-11-14 10:00:31 +13:00
Thorin-Oakenpants
e080becba5 2610: permissions.manager.defaultsUrl #259
FYI: https://bugzilla.mozilla.org/show_bug.cgi?id=506446 - FF35
2017-11-12 00:14:36 +13:00
Thorin-Oakenpants
76bc2bce25 5008: open bookmarks in a new tab 2017-11-11 23:04:30 +13:00
Thorin-Oakenpants
7f4a671b09 fixup spacing 2017-11-09 12:15:02 +13:00
Thorin-Oakenpants
b373fe2a58 5014: download button visibility 2017-11-09 10:54:52 +13:00
Thorin-Oakenpants
95f1d6ecf6 0514: activity stream fixup
`browser.newtabpage.activity-stream.aboutHome.enabled` is not needed, as it is controlled by `browser.newtabpage.activity-stream.enabled`
2017-11-09 10:31:08 +13:00
Thorin-Oakenpants
3028a7a61a 5025: another media type 2017-11-09 07:58:21 +13:00
Thorin-Oakenpants
06d9d61558 0514: more activity stream 2017-11-09 07:05:08 +13:00
Thorin-Oakenpants
1dd683c81f 0330: more telemetry pings 2017-11-09 03:13:42 +13:00
Thorin-Oakenpants
2c56d90a6f Create test.js 2017-11-01 02:28:23 +13:00
Thorin-Oakenpants
df01fb87ce 2300: *workers info fixup
"Push and web notifications require service workers, which in turn require workers." - this is clearly not (or no longer) true. See #256 where workers are disabled, but service workers enabled, and service workers create IDB entries on Youtube
2017-10-31 20:17:26 +13:00
Thorin-Oakenpants
ce66da10a4 start 57 commits 2017-10-31 16:51:44 +13:00
Thorin-Oakenpants
e1034faf1f readme: extension cookie exceptions 2017-10-31 16:29:46 +13:00
Thorin-Oakenpants
d4cfd1e885 4500: canvas extraction 967895 2017-10-29 05:11:43 +13:00
Thorin-Oakenpants
6cdfd1a443 Add files via upload 2017-10-09 17:24:42 +13:00
Thorin-Oakenpants
ca16792723 4600s: add ref to old numbers 2017-10-06 21:44:19 +13:00
Thorin-Oakenpants
6e2479dc0f 0210 tweak 2017-10-04 07:53:12 +13:00
earthlng
bbb29237cc 4609 + 02xx cleanup
Only `geo.enabled` is covered by RFP, keep the other prefs under 0200 and do some cleanup

- 0202: the /en-US/ in link [2] is necessary for the anchor to work!
- `browser.search.geoip.timeout;1` is unnecessary when `browser.search.geoip.url` is empty string:
https://dxr.mozilla.org/mozilla-central/source/toolkit/components/search/nsSearchService.js#576
2017-10-03 17:37:50 +02:00
earthlng
fec0c99287 4608 - remove media.webspeech.recognition.enable
the 2nd part of the Web Speech API, SpeechRecognition, is not yet implemented on Desktop Firefox:

https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition#Browser_compatibility

> * [2] Can be enabled via the `media.webspeech.recognition.enable` flag in about:config **on mobile**. **Not implemented at all on Desktop Firefox** — see [bug 1248897](https://bugzilla.mozilla.org/show_bug.cgi?id=1248897).
2017-10-03 17:00:11 +02:00
Thorin-Oakenpants
258e8ff805 4700 fixup
remove mention of ESR, fix current TBB platform as 32bit - not that it matters, it's all inactive
2017-10-02 17:53:24 +13:00
Thorin-Oakenpants
a74170e2b0 5005: clipboard.autocopy #109
this is a linux only pref, does nothing in Windows or Mac, as per tagging convention => [LINUX]. Here's a 15 year old ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=160200 .. enjoy! PS: Trying to find an autocopy text (excluding form fields) that auto trims, auto removes multi-spaces, auto trims, and auto removes double blank lines .. I had one, but its legacy. Best I can find is https://addons.mozilla.org/en-US/firefox/addon/autocopy-webextension/ - a wee timer in options lets you control when you copy (that's ok), but it gives a notification every time which is annoying as f - anyone got any ideas
2017-10-02 11:46:34 +13:00
Thorin-Oakenpants
e29a301578 56 release 2017-10-02 09:39:03 +13:00
Thorin-Oakenpants
1031312f82 FF56+ redesigned preferences UI + [SETTING] tags 2017-10-02 09:32:27 +13:00
Thorin-Oakenpants
ddfdf7cb47 oophs 2017-10-02 06:00:28 +13:00
Thorin-Oakenpants
649e49e0fa 4600: redundant prefs FF55 due to RFP [Part2] 2017-10-02 05:58:13 +13:00
Thorin-Oakenpants
908a8d66f4 4600: redundant prefs FF55 due to RFP [Part1] 2017-09-30 20:15:41 +13:00
Thorin-Oakenpants
4a91b866a4 4500: clarify RFP Geo API
This is not the same as disabling the API with `geo.enabled` - see https://bugzilla.mozilla.org/show_bug.cgi?id=1403813
2017-09-30 19:05:30 +13:00
Thorin-Oakenpants
0912b03f62 2675: block top level data: URIs
note: I changed `data://` to `data:` in section 4000's 1300671 description
2017-09-29 03:06:22 +13:00
Thorin-Oakenpants
12f80bdf65 FF56 deprecation 2017-09-28 21:27:40 +13:00
Thorin-Oakenpants
88216743a5 2508: gfx h/w #244
- In FF55 (windows) this no longer changes both prefs, only `layers.acceleration.disabled`
- `gfx.direct2d.disabled` => inactive (I do not think it is used much if at all anymore - do a DXR search)
2017-09-28 06:12:19 +13:00
Thorin-Oakenpants
fa94f9b3c1 0001: PB breaks Extensions+IDB
Mozilla should really exempt moz-extensions from being blocked by indexedDB=false
2017-09-27 12:38:02 +13:00
Thorin-Oakenpants
620a0ee29c 5016: reload/stop animation FF56+
[1355924](https://bugzilla.mozilla.org/show_bug.cgi?id=1355924) and for some fixes in 57 see [1384180](https://bugzilla.mozilla.org/show_bug.cgi?id=1384180)
2017-09-27 03:40:04 +13:00
Thorin-Oakenpants
a25df4c942 0209: fixup regional pref OS locale
I think I need a break
2017-09-20 03:23:10 +12:00
Thorin-Oakenpants
7fa0025baf 2804: clarify Clear Recent History #237 2017-09-19 05:22:25 +12:00
Thorin-Oakenpants
80ac9dfa1f 1404->1402: default fonts => inactive #237
Inactive as this actually can cause problems on Linux with tofu (I think arial on debian causes tofu - ask nodiscc) . Also incomplete with non-Western settings
2017-09-19 04:54:52 +12:00
Thorin-Oakenpants
a93ce5d9f1 2024 MSE => 5024 => inactive #237 2017-09-19 03:49:51 +12:00
Thorin-Oakenpants
367972155a 2509: tidy up Touch API #237 2017-09-19 03:25:07 +12:00
earthlng
985c164cd0 tiny update 2017-09-18 16:07:43 +02:00
Thorin-Oakenpants
f5ffeff971 4503: RFP mozAddonManager
Inactive: 1: currently only three sites (hard-coded) can access this, all run by Mozilla 2: it is likely to be used on the new AMO site to determine your Firefox version
2017-09-18 18:40:15 +12:00
Thorin-Oakenpants
31e7c72f64 0209: add regional pref OS locale 2017-09-18 02:38:09 +12:00
Thorin-Oakenpants
2f6deda172 readme: add RFP alt / deprecated info 2017-09-17 22:29:05 +12:00
Thorin-Oakenpants
39594629e5 2513: presentation API => inactive #237 2017-09-17 20:31:42 +12:00
Thorin-Oakenpants
ca30ba4994 0500: add Linux path
Looks weird: portable, windows, mac using `\` and Linux using `/` :)
2017-09-17 19:58:54 +12:00
Thorin-Oakenpants
5338b6fb60 4500: add our acronym RFP 2017-09-16 10:36:30 +12:00
Thorin-Oakenpants
bdf0e5ed56 parrot pref name change #237 2017-09-16 10:28:22 +12:00
Thorin-Oakenpants
89474d014f 1200s: ciphers=>inactive #237 2017-09-16 06:20:00 +12:00
Thorin-Oakenpants
c84a59fd95 ESR parrot
a deprecated parrot.. seems apt... and that's it, no more parrots, please.. I'm all parroted out
2017-09-16 05:43:45 +12:00
Thorin-Oakenpants
598ee751f5 2500s: 4 h/w prefs=>inactive #237 2017-09-16 05:26:07 +12:00
Thorin-Oakenpants
2e4e0a6327 Bwooooarrkkk .. missing parrots
For the four new sections .. hopefully no more parrots need be harmed in the making of this js. PS: The origin of popping clogs is interesting
2017-09-16 02:33:29 +12:00
Thorin-Oakenpants
4d35be7ccb 0517: *.formautofill.available
replaces `extensions.formautofill.experimental`
2017-09-16 01:32:22 +12:00
earthlng
f3bd095fe9 5015 - add version info (FF55+) 2017-09-15 14:56:24 +02:00
earthlng
e794611920 4502 - will always round down ... 2017-09-15 14:46:31 +02:00
earthlng
f450c2172b 1221 - test site works again 2017-09-15 14:44:05 +02:00
Thorin-Oakenpants
6a7dac32cc 4601: => inactive
Are the possible/unknown downsides of this one FP measure really worth it for ESR users? - see earthlng
2017-09-15 18:39:43 +12:00
earthlng
6900924aa6 0320 - disable Get Add-ons panel 2017-09-15 01:47:54 +02:00
Thorin-Oakenpants
7c2be97879 2418 full-screen site permission fix
site permission no longer has a full screen override - no idea when it was removed
2017-09-14 22:54:55 +12:00
Thorin-Oakenpants
5e414ff5cb 4600: redundant prefs FF55 due to RFP 2017-09-14 17:43:24 +12:00
Thorin-Oakenpants
13aa4a0290 create 4600s: RFP alternatives 2017-09-14 17:28:52 +12:00
Thorin-Oakenpants
76672ed767 2697 spoofing -> 4700s 2017-09-14 17:00:55 +12:00
Thorin-Oakenpants
a5ae7d17a3 oophs 2017-09-14 16:39:05 +12:00
Thorin-Oakenpants
54b64e3f3c 2699 RFP -> 4500s 2017-09-14 15:57:42 +12:00
Thorin-Oakenpants
17ba1401cf 2698 FPI -> 4000s 2017-09-14 15:25:32 +12:00
Thorin-Oakenpants
e09e5ab8db 2699: FP resistance for Presentation API 2017-09-14 12:12:09 +12:00
Thorin-Oakenpants
caed9d833c shove 3000s personal out to 5000s
couple of number changes to get rid of alphabet soup: 3001a->5002, 3002->5003
2017-09-13 04:56:21 +12:00
Thorin-Oakenpants
d9f76d3add start 56 commits 2017-09-13 03:14:56 +12:00
Thorin-Oakenpants
bb2325cad2 2699: fixup 1333641 description
bug 1333641 does not disable the WebSpeech API
2017-09-11 17:03:52 +12:00
Thorin-Oakenpants
9a0edfe887 0330: another ping bites the dust 2017-09-10 01:43:02 +12:00
Thorin-Oakenpants
0277ba8102 2699: more UA spoofing stuff
move along people, nothing to see: added 1396468 which fixes a leak, it will probably be pushed to beta (FF56)
2017-09-09 16:49:26 +12:00
Thorin-Oakenpants
b907dd7e83 new terminology
https://wiki.mozilla.org/Add-ons/Terminology . The only "Web Extension" or "WebExtension" or "Add-on" references left are due to UI wording or links or pref names
2017-09-09 16:18:16 +12:00
Thorin-Oakenpants
83bb51b988 Update README.md 2017-09-09 15:35:14 +12:00
Thorin-Oakenpants
f3c87367fb 2699: spoof FF version changes 2017-09-07 14:46:31 +12:00
earthlng
ffc8280c0c 9999: 2502 cleanup 2017-09-02 19:07:28 +02:00
Thorin-Oakenpants
346b945ee3 2699: limit MediaError.message 2017-09-03 00:44:23 +12:00
Thorin-Oakenpants
b86f625b02 URL changes #224 Part3
check: 49 items as per issue comment
2017-08-31 17:27:04 +12:00
Thorin-Oakenpants
431b55f47f 2404: indexedDB=>inactive, required for uBo 1.14.0+ #226
Not just uBo but many web exts are using indexedDB for storage. Users will have to deal with indexedDB persistent storage via other means.
2017-08-31 16:51:38 +12:00
Thorin-Oakenpants
4120419cd5 URL changes ##224 Part2
[Ch-ch-ch-ch-changes](https://en.wikipedia.org/wiki/Changes_(David_Bowie_song))
2017-08-30 18:17:06 +12:00
Thorin-Oakenpants
9f30adee64 URL changes #224
Thanks Theemim. Double check, so far: 27 changes, 27 items checked in Theemim's list
2017-08-30 17:07:43 +12:00
Thorin-Oakenpants
a19a3d2a35 worlds tiniest typo } -> ]
Sidenote: Not sure if this is true anymore. Since I ditched CTR and I have the hamburger menu back, it loves to annoy me with a doorhanger ALL THE F**kng TIME - certainly not 8 days grace. Seems more like 12 hours (but I swear it also comes up soon after a restart as well)
2017-08-29 17:27:18 +12:00
Thorin-Oakenpants
b6533689cf 2699: add Animation API, description fixups #222 2017-08-28 07:20:45 +12:00
Thorin-Oakenpants
ae83b83590 0517: formautofill.creditCards.enabled 2017-08-27 15:46:12 +12:00
earthlng
4977d01fec 0517: add .creditCards.enabled;false (FF56+)
it's most likely covered by disabling extensions.formautofill but is nice to know for people who want to enable form-autofill but may want to disable creditCards autofill
2017-08-26 16:27:48 +02:00
Thorin-Oakenpants
eab3a0b714 2699: enable fingerprinting resistance for WebGL 2017-08-25 16:11:03 +12:00
earthlng
dd25413c98 all-round -> all-around 2017-08-24 16:00:05 +02:00
Thorin-Oakenpants
3d109664bb couple of [SETTING] updates #212 2017-08-19 18:12:08 +12:00
8 changed files with 699 additions and 408 deletions

View File

@@ -2,7 +2,7 @@
A `user.js` is a configuration file that can control hundreds of Firefox settings. For a more technical breakdown and explanation, you can read more on the [overview](https://github.com/ghacksuserjs/ghacks-user.js/wiki/1.1-Overview) wiki page. A `user.js` is a configuration file that can control hundreds of Firefox settings. For a more technical breakdown and explanation, you can read more on the [overview](https://github.com/ghacksuserjs/ghacks-user.js/wiki/1.1-Overview) wiki page.
### ![](https://github.com/ghacksuserjs/ghacks-user.js/blob/master/wikipiki/bullet01.png) ghacks user.js ### ![](https://github.com/ghacksuserjs/ghacks-user.js/blob/master/wikipiki/bullet01.png) ghacks user.js
The [ghacks user.js](https://github.com/ghacksuserjs/ghacks-user.js/blob/master/user.js) is a template, which, as provided, aims (![](https://github.com/ghacksuserjs/ghacks-user.js/blob/master/wikipiki/exclamation.png) with [add-ons](https://github.com/ghacksuserjs/ghacks-user.js/wiki/Appendix-B:-Firefox-Add-ons) <sup>1</sup> ) to provide as much privacy and enhanced security as possible, and to reduce tracking and fingerprinting as much as possible - while minimizing any loss of functionality and breakage (but it will happen). The [ghacks user.js](https://github.com/ghacksuserjs/ghacks-user.js/blob/master/user.js) is a template, which, as provided, aims (![](https://github.com/ghacksuserjs/ghacks-user.js/blob/master/wikipiki/exclamation.png) with [extensions](https://github.com/ghacksuserjs/ghacks-user.js/wiki/Appendix-B:-Extensions) <sup>1</sup> ) to provide as much privacy and enhanced security as possible, and to reduce tracking and fingerprinting as much as possible - while minimizing any loss of functionality and breakage (but it will happen).
We aim to INFORM and give you CHOICES. No one size fits all, so customize it! And not all sites have the same requirements, so use [profiles](https://github.com/ghacksuserjs/ghacks-user.js/wiki/2.3-Concurrent-Profiles) with custom versions. We won't set you wrong. We aim to INFORM and give you CHOICES. No one size fits all, so customize it! And not all sites have the same requirements, so use [profiles](https://github.com/ghacksuserjs/ghacks-user.js/wiki/2.3-Concurrent-Profiles) with custom versions. We won't set you wrong.
@@ -16,7 +16,7 @@ INFORMATION IS POWER. So you can make informed decisions to better protect yours
* Current and up-to-date with stable (including [changelogs](https://github.com/ghacksuserjs/ghacks-user.js/search?q=label%3Achangelog&type=Issues&utf8=%E2%9C%93)) * Current and up-to-date with stable (including [changelogs](https://github.com/ghacksuserjs/ghacks-user.js/search?q=label%3Achangelog&type=Issues&utf8=%E2%9C%93))
* Detailed (preference versioning, hidden preference information, explanations, and more) * Detailed (preference versioning, hidden preference information, explanations, and more)
* Easy to use and discuss (sections, sub-sections, numbering) * Easy to use and discuss (sections, sub-sections, numbering)
* Helpful (including a [wiki](https://github.com/ghacksuserjs/ghacks-user.js/wiki) with features such as [add-ons](https://github.com/ghacksuserjs/ghacks-user.js/wiki/Appendix-B:-Firefox-Add-ons), [user scripts](https://github.com/ghacksuserjs/ghacks-user.js/wiki/3.1-User-Scripts), [references](https://github.com/ghacksuserjs/ghacks-user.js/wiki/Appendix-D:-References) and more) * Helpful (including a [wiki](https://github.com/ghacksuserjs/ghacks-user.js/wiki) with features such as [extensions](https://github.com/ghacksuserjs/ghacks-user.js/wiki/Appendix-B:-Extensions), [user scripts](https://github.com/ghacksuserjs/ghacks-user.js/wiki/3.1-User-Scripts), [references](https://github.com/ghacksuserjs/ghacks-user.js/wiki/Appendix-D:-References) and more)
* Innovative (formatting, special tags, and future plans such as branches) * Innovative (formatting, special tags, and future plans such as branches)
### ![](https://github.com/ghacksuserjs/ghacks-user.js/blob/master/wikipiki/bullet01.png) usage ### ![](https://github.com/ghacksuserjs/ghacks-user.js/blob/master/wikipiki/bullet01.png) usage
@@ -26,7 +26,7 @@ Everyone, experts included, should at least read the [implementation](https://gi
Literally thousands of sources, references and suggestions. That said... Literally thousands of sources, references and suggestions. That said...
* Martin Brinkmann at [ghacks](https://www.ghacks.net/) <sup>2</sup> * Martin Brinkmann at [ghacks](https://www.ghacks.net/) <sup>2</sup>
* 100% genuine super-nice all-round good guy * 100% genuine super-nice all-around good guy
* The ghacks community and commentators * The ghacks community and commentators
* Special mentions to [earthlng](https://github.com/earthlng), Tom Hawack, Just me, Conker, Rockin Jerry, Ainatar, Parker Lewis * Special mentions to [earthlng](https://github.com/earthlng), Tom Hawack, Just me, Conker, Rockin Jerry, Ainatar, Parker Lewis
* [12bytes](http://12bytes.org/articles/tech/firefoxgecko-configuration-guide-for-privacy-and-performance-buffs) * [12bytes](http://12bytes.org/articles/tech/firefoxgecko-configuration-guide-for-privacy-and-performance-buffs)

View File

@@ -0,0 +1 @@
// boo!

107
updater.bat Normal file
View File

@@ -0,0 +1,107 @@
@ECHO OFF
TITLE ghacks user.js updater
REM ### ghacks-user.js updater for Windows
REM ## author: @claustromaniac
REM ## version: 2.1
SETLOCAL EnableDelayedExpansion
SET "_ua="
SET "_log="
:parse
IF "%~1"=="" GOTO endparse
IF "%~1"=="-unattended" SET "_ua=true"
IF "%~1"=="-log" SET "_log=true"
SHIFT
GOTO parse
:endparse
SET "_name="
SET "_date="
SET "_version="
SET /A "_line=0"
ECHO.
IF EXIST user.js (
FOR /F "delims=" %%i IN (user.js) DO (
IF !_line! EQU 1 SET "_name=%%i"
IF !_line! EQU 2 SET "_date=%%i"
IF !_line! EQU 3 SET "_version=%%i"
SET /A "_line+=1"
IF !_line! GEQ 4 GOTO break
)
:break
IF !_line! GEQ 4 (
IF "ghacks"=="!_name:~8,6!" (
FOR /F "delims=:" %%G IN ("!_version!") DO SET "_version=%%G"
SET "_version=!_version:~2!"
SET "_date=!_date:~8!"
ECHO ghacks user.js !_version!, !_date!
) ELSE ( ECHO Current user.js version not recognised. )
) ELSE ( ECHO Current user.js version not recognised. )
) ELSE ( ECHO user.js not detected in the current directory. )
ECHO.
IF NOT "%_ua%"=="true" (
ECHO This batch should be run from your Firefox profile directory. It will download the latest version of ghacks user.js from github and then append any of your own changes from user-overrides.js to it.
ECHO.
REM ECHO Visit the wiki for more detailed information.
REM ECHO.
CHOICE /M "Continue"
IF ERRORLEVEL 2 GOTO end
)
CLS
ECHO.
IF "%_log%"=="true" (
CALL :log >>user.js-update-log.txt 2>&1
EXIT /B
:log
ECHO ##################################################################
ECHO.
ECHO %date%, %time%
ECHO.
)
IF EXIST user.js (
IF EXIST user.js.bak REN user.js.bak user.js.old.bak
REN user.js user.js.bak
ECHO Current user.js file backed up.
ECHO.
)
ECHO Retrieving latest user.js file from ghacks github repository...
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://github.com/ghacksuserjs/ghacks-user.js/raw/master/user.js', 'user.js')" >nul
ECHO.
IF EXIST user.js (
IF EXIST "user-overrides.js" (
ECHO Appending user-overrides.js...
ECHO.
COPY /B /V /Y user.js+"user-overrides.js" "tempuserjs"
DEL /F user.js
REN tempuserjs user.js
ECHO.
)
ECHO Handling backups...
SET "changed="
IF EXIST user.js.bak ( FC user.js.bak user.js >nul && SET "changed=false" || SET "changed=true" )
ECHO.
ECHO.
IF "!changed!"=="true" (
IF EXIST user.js.old.bak DEL /F user.js.old.bak
ECHO Update complete.
) ELSE (
IF "!changed!"=="false" (
DEL /F user.js.bak
IF EXIST user.js.old.bak REN user.js.old.bak user.js.bak
ECHO Update completed without changes.
) ELSE ECHO Update complete.
)
ECHO.
) ELSE (
IF EXIST user.js.bak REN user.js.bak user.js
IF EXIST user.js.old.bak REN user.js.old.bak user.js.bak
ECHO.
ECHO Update failed. Make sure PowerShell is allowed internet access.
ECHO.
ECHO No changes were made.
ECHO.
)
IF NOT "%_log%"=="true" (
IF NOT "%_ua%"=="true" PAUSE
)
:end

55
updater.sh Normal file
View File

@@ -0,0 +1,55 @@
#!/bin/bash
### ghacks-user.js updater for Mac/Linux
## author: @overdodactyl
## version: 1.1
ghacksjs="https://raw.githubusercontent.com/ghacksuserjs/ghacks-user.js/master/user.js"
echo -e "\nThis script should be run from your Firefox profile directory.\n"
currdir=$(pwd)
## get the full path of this script (greadlink for Mac, readlink for Linux)
scriptfullpath=$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")
## change directory to the Firefox profile directory
cd "$(dirname "${scriptfullpath}")"
echo -e "Updating the user.js for Firefox profile:\n$(pwd)\n"
if [ -e user.js ]; then
echo "Your current user.js file for this profile will be backed up and the latest ghacks version from github will take its place."
echo -e "\nIf currently using the ghacks user.js, please compare versions:"
echo " Available online: $(curl -s ${ghacksjs} | sed -n '4p')"
echo " Currently using: $(sed -n '4p' user.js)"
else
echo "A user.js file does not exist in this profile. If you continue, the latest ghacks version from github will be downloaded."
fi
echo -e "\nIf a user-overrides.js file exists in this profile, it will be appended to the user.js.\n"
read -p "Continue Y/N? " -n 1 -r
echo -e "\n\n"
if [[ $REPLY =~ ^[Yy]$ ]]; then
if [ -e user.js ]; then
# backup current user.js
bakfile="user.js.backup.$(date +"%Y-%m-%d_%H%M")"
mv user.js "${bakfile}" && echo "Your previous user.js file was backed up: ${bakfile}"
fi
# download latest ghacks user.js
echo "downloading latest ghacks user.js file"
curl -O ${ghacksjs} && echo "ghacks user.js has been downloaded"
if [ -e user-overrides.js ]; then
echo "user-overrides.js file found"
cat user-overrides.js >> user.js && echo "user-overrides.js has been appended to user.js"
fi
else
echo "Process aborted"
fi
## change directory back to the original working directory
cd "${currdir}"

938
user.js

File diff suppressed because it is too large Load Diff

BIN
wikipiki/exceptions01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
wikipiki/exceptions02.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

BIN
wikipiki/exceptions03.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB