-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathXYplorerFeatureAnchors.user.js
More file actions
28 lines (27 loc) · 979 Bytes
/
XYplorerFeatureAnchors.user.js
File metadata and controls
28 lines (27 loc) · 979 Bytes
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
// ==UserScript==
// @name XYplorer Feature Anchors
// @description Show anchors in XYplorer's feature list.
// @version 0.2
// @author TheQwerty
// @namespace https://github.com/TheQwerty/Misc-UserScripts/raw/master/
// @homepage https://github.com/TheQwerty/Misc-UserScripts
// @grant none
//
// @match *://*.xyplorer.com/features.php
// @match *://*.xyplorer.com/product.php
// ==/UserScript==
(function(){
var featureTDs = document.getElementsByClassName('f');
for (var idx=0, last=featureTDs.length; idx < last; idx++) {
var td = featureTDs[idx];
if (td && td.id) {
var a = document.createElement('a');
a.textContent = '#';
a.href = '#' + encodeURIComponent(td.id);
a.style.fontSize = '.75em';
a.style.color = '#AAA';
a.style.paddingRight = '4';
td.insertBefore(a, td.firstChild);
}
}
})();