MediaWiki:Gadget-find-archived-section.js: Difference between revisions
Content deleted Content added
update Api-User-Agent to new ___location, requested on talk |
+function requested on talk |
||
Line 73:
// if str contains $ signs, we don't want String.prototype.replace to treat them with special meaning
return (escapeHtml ? mw.html.escape(str) : str).replace(/\$/g, '$$$$');
};
var escapeQuotes = function(str) {
return str.replace(/"/g, '\\"');
};
Line 93 ⟶ 97:
var searchQuery = sectionNameDotDecoded === sectionName ?
'"' + escapeQuotes(sectionName) + '" prefix:"' + prefix + '"' :
'"' + escapeQuotes(sectionName) + '" OR "' + escapeQuotes(sectionNameDotDecoded) + '" prefix:"' + prefix + '"';
mw.loader.using(['mediawiki.util', 'mediawiki.api']).then(function() {
|