User:PC-XT/Advisor.js: Difference between revisions

Content deleted Content added
m get rid of warnings by using mw.config.get
maintenance: more info TypeError: Cannot read property 'parentNode' of null
 
(3 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 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) {
e.parentNode.insertBefore(ct.eSuggestions, e);
} else {
return;
}
ct.eAddToSummary = document.createElement('DIV');
ct.eAddToSummary.style.border = 'dashed #ccc 1px';
Line 370 ⟶ 375:
}
// Warn about scanning a talk page
ifvar ((window.wgCanonicalNamespace != nullmw.config.get('wgCanonicalNamespace');
&& if /(\b|_)talk$/i.test(window.wgCanonicalNamespace != null)
&& /(\b|_)talk$/i.test(wgCanonicalNamespace)
&& !ct.isTalkPageScanConfirmed) {
ct.eSuggestions.appendChild(document.createTextNode(
Line 1,481 ⟶ 1,487:
 
} // end if (mw.config.get('wgContentLanguage') === 'en') // end of default rules
//</nowiki>