Content deleted Content added
should document which fork is in use, in case there is a problem |
maintenance: more info TypeError: Cannot read property 'parentNode' of null |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 1:
//<nowiki>
// See http://en.wikipedia.org/wiki/User:Cameltrader/Advisor.js/Description
// for details and installation instructions.
Line 122 ⟶ 123:
// It is convenient to embed in a help popup.
ct.hlink = function (toWhat, text) {
var wgServer =
var wgArticlePath =
var url = (wgServer + wgArticlePath).replace('$1', toWhat);
return '<a href="' + url + '" target="_blank">' + (text || toWhat) + '</a>';
Line 252 ⟶ 253:
var e = document.getElementById('editform');
while (true) {
var p = e && e.previousSibling;
if ( (p == null) || ((p.nodeType == 1) && (p.id != 'toolbar')) ) {
break;
Line 258 ⟶ 259:
e = p;
}
if(e) {
} else {
return;
}
ct.eAddToSummary = document.createElement('DIV');
ct.eAddToSummary.style.border = 'dashed #ccc 1px';
Line 370 ⟶ 375:
}
// Warn about scanning a talk page
&& /(\b|_)talk$/i.test(wgCanonicalNamespace)
&& !ct.isTalkPageScanConfirmed) {
ct.eSuggestions.appendChild(document.createTextNode(
Line 607 ⟶ 613:
// * name---this is what appears at the top of the page
// * description---used as a tooltip for the name of the suggestion
// The rules are stored in an array:▼
ct.rules = ct.rules||[]; // : Function[]▼
// and are grouped into categories.▼
// The set of rules to apply depends on the content language. Different
Line 614 ⟶ 624:
// Wikipedia.
if (!
▲// The rules are stored in an array:
▲ct.rules = ct.rules||[]; // : Function[]
▲// and are grouped into categories.
// === Linking rules ===
Line 1,136 ⟶ 1,142:
ct.rules.push(function (s) {
var exceptions = {};
var wgTitle =
if (exceptions[wgTitle]) {
return [];
Line 1,181 ⟶ 1,187:
ct.rules.push(function (s) {
var wgTitle =
var reTitle = /^(a|the) (.*)$/i;
if (!reTitle.test(wgTitle) || (s.indexOf('DEFAULTSORT') !== -1)) {
Line 1,432 ⟶ 1,438:
end: m.end,
name: 'ISBN',
replacement: m[1]+" {{Please check ISBN|"+m[1]+"}}",
description: 'Should be either 10 or 13 digits long',
help: 'ISBN numbers should be either 10 or 13 digits long. '
Line 1,480 ⟶ 1,486:
});
} // end if (
//</nowiki>
|