Updated 3.1 User Scripts (markdown)

earthlng
2017-03-14 20:18:14 +01:00
parent 47d4e71c0d
commit 32e782cc22

@@ -3,7 +3,7 @@ Use [Greasemonkey](https://addons.mozilla.org/en-Us/firefox/addon/greasemonkey/)
### Conceal history.length
This does not break history in any way. It just lies to any JS asking about it. Your actual (max) history is controlled by `browser.sessionhistory.max_entries` which is a per tab setting.
<br>You can test it at [JoDonym](http://ip-check.info/?lang=en)</br>
<br>You can test it at [BrowserSpy.dk](http://browserspy.dk/document.php)</br>
```js
// ==UserScript==
@@ -16,9 +16,17 @@ This does not break history in any way. It just lies to any JS asking about it.
// @grant none
// ==/UserScript==
let _history={length:history.length};
Object.defineProperty(history,'length',{
get: function() { return 2; }
get: function() {
if (_history.length > 2) {
return 2;
} else {
return _history.length;
}
}
});
```
### Conceal window.name