mirror of
https://github.com/arkenfox/user.js.git
synced 2024-11-25 20:11:38 +01:00
Updated 1.6 Firefox Android (markdown)
parent
35468c58a2
commit
ff9d7ab208
@ -1,4 +1,4 @@
|
||||
Authors: Non-Rooted Wiki: [icpantsparti](https://github.com/icpantsparti) | Script: [TerkiKerel](https://github.com/TerkiKerel) | Rooted Wiki: [jghq](https://github.com/jghq) | Many thanks :)
|
||||
Authors: Non-Rooted Wiki: [icpantsparti](https://github.com/icpantsparti) and [username-is-not](https://github.com/username-is-not) | Script: [TerkiKerel](https://github.com/TerkiKerel) | Rooted Wiki: [jghq](https://github.com/jghq) | Many thanks :)
|
||||
|
||||
:warning: **WARNING**: This `user.js` is **designed for desktop Firefox ONLY**
|
||||
- Fennec [68 or lower]: some prefs may not apply, or may cause issues, or may be missing
|
||||
@ -38,7 +38,7 @@ Choose `1A` Wi-Fi (easier) or `1B` USB connection
|
||||
- Enable `Remote debugging via Wi-Fi` on Android Firefox (Options|Settings|Advanced)
|
||||
* You might have to toggle this off/on later if troubleshooting
|
||||
- On desktop Firefox visit and set true: about:config?filter=`devtools.webide.enabled`
|
||||
- Open WebIDE on desktop Firefox (Shift+F8 or menu|Tools|Web Developer)
|
||||
- Open Remote Debugging on desktop Firefox (menu|Tools|Web Developer)
|
||||
- Click `Refresh Devices` icon (upper right), click on your Android device
|
||||
- Scan the QR code with your Android to connect
|
||||
|
||||
@ -59,11 +59,10 @@ If the device is not seen (note any settings changes for reversal later): Visit
|
||||
* You might have to toggle either of these off/on later if troubleshooting.
|
||||
* Note: to unhide `Developer options` tap `Build number` 7 times (Settings app|About Device)
|
||||
- Watch out for any Android allow/connect prompts.
|
||||
- On desktop Firefox visit and set true: about:config?filter=`devtools.webide.enabled`
|
||||
- Open WebIDE on desktop Firefox (Shift+F8 or menu|Tools|Web Developer)
|
||||
- You need the ADB Helper Add-on (menu|Project|Manage Extra Components)
|
||||
* Click uninstall/install to update, or [get it here if you have trouble](https://ftp.mozilla.org/pub/labs/fxos-simulator/adb-helper/).</a>
|
||||
- Click `Refresh Devices` icon (upper right), click on your Android device
|
||||
- Open Remote Debugging on desktop Firefox (menu|Tools|Web Developer)
|
||||
- You need to `Enable USB Devices`
|
||||
* For any issues see below: "Problems connecting to the USB device?" [Troubleshoot](https://developer.mozilla.org/docs/Tools/Remote_Debugging/Debugging_over_USB)
|
||||
- Click `Refresh Devices` icon, click on your Android device
|
||||
|
||||
|
||||
:question: Troubleshooting
|
||||
@ -77,14 +76,12 @@ If the device is not seen (note any settings changes for reversal later): Click
|
||||
:small_blue_diamond: 2: Remote access
|
||||
|
||||
- Open `about:config` page on Android Firefox
|
||||
* It will show under WebIDE `TABS` on Desktop Firefox too (use tabs refresh icon)
|
||||
- Click the remote tab name and the `web developer tools` panel will open
|
||||
* if you exit the panel by accident use: F12 or Project|Debug App
|
||||
- Select the `Scratchpad` button
|
||||
* If there is no button for `Scratchpad` click the cog and enable it
|
||||
* It will show under `Tabs` on Desktop Firefox too.
|
||||
- Click `Inspect` for `about:config` (Tabs) and this will open a new tab `about:devtools-toolbox?id=`
|
||||
- Select `Console` if not already marked
|
||||
|
||||
:small_blue_diamond: 3: Inject the preferences
|
||||
- Paste the javascript and your `user.js` into the scratchpad
|
||||
- Paste the javascript and your `user.js` into the Console
|
||||
|
||||
```js
|
||||
var user_pref = function(pref, val){
|
||||
@ -108,18 +105,16 @@ user_pref("general.aboutConfig.enable", true); // unblock about:config in newer
|
||||
//paste your user.js file content on the next line
|
||||
```
|
||||
|
||||
- The script sets a function called `user_pref` so wherever that appears in the rest of the code (ie in the part from your `user.js`) that function is called to set the user preference. Any code for preferences that are commented out will not be run. If a preference name does not exist or is mistyped it will still be created without any warnings.
|
||||
- Use `Display` (Ctrl+L) to run the javascript as it adds a result message in a comment after the script, which will say "undefined" or show errors.
|
||||
- The script sets a function called `user_pref` so wherever that appears in the rest of the code (i.e. in the part from your `user.js`) that function is called to set the user preference. Any code for preferences that are commented out will not be run. If a preference name does not exist or is mistyped it will still be created without any warnings.
|
||||
- After `Run` (or Ctrl+ENTER) split-screen `Console` view on the right will say "undefined" or show errors.
|
||||
- if you get a `ReferenceError: user_pref is not defined`, reload about:config on the phone and then run the script again
|
||||
- Also click the `Console` button to look for any other error messages.
|
||||
- If errors occur on a line, the script might have stopped at that line, and you will need to correct the error in the code and re-run.
|
||||
- Check your Android Firefox `about:support` and `about:config pages` for your modified preferences, and see if the `_user.js.parrot` preference is showing success.
|
||||
|
||||
:small_blue_diamond: 4: Finish
|
||||
|
||||
- Disconnect: WebIDE menu|Runtime|Disconnect
|
||||
- Disconnect: `Disconnect` (top-right)
|
||||
- For security, reverse settings you temporarily changed in any steps above:
|
||||
* Desktop Firefox's WebIDE preference back to false
|
||||
* Android Firefox's debugging off
|
||||
* Android's USB debugging off (if used)
|
||||
* Troubleshooting changes (desktop firewall, android firewall, router, etc)
|
||||
|
Loading…
Reference in New Issue
Block a user