forked from alice0775/userChrome.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
patchForBug493658.uc.js
29 lines (28 loc) · 1.18 KB
/
patchForBug493658.uc.js
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
// ==UserScript==
// @name patchForBug493658.uc.js
// @namespace http://space.geocities.yahoo.co.jp/gl/alice0775
// @description Bug 493658 - Highlight all of the Findbar does not work in a certain page
// @include main
// @include chrome://global/content/viewSource.xul
// @include chrome://global/content/viewPartialSource.xul
// @compatibility Firefox 3.0 3.5 3.6a1pre
// @author Alice0775
// @version 2009/05/19 10:00
// ==/UserScript==
document.getElementById("FindToolbar")
._getSelectionController =function _getSelectionController(aWindow) {
// Yuck. See bug 138068.
var Ci = Components.interfaces;
var docShell = aWindow.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShell);
// Bug 493658 - Highlight all of the Findbar does not work in a certain page
try {
var controller = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsISelectionDisplay)
.QueryInterface(Ci.nsISelectionController);
} catch (e) {
return null;
}
return controller;
}