User:L10nM4st3r/template remover config.js
Jump to navigation
Jump to search
Note: After saving, you have to bypass your browser's cache to see the changes.
- Internet Explorer: hold down the Ctrl key and click the Refresh or Reload button, or press Ctrl+F5.
- Firefox: hold down the Shift key while clicking Reload; alternatively press Ctrl+F5 or Ctrl-Shift-R.
- Opera, Konqueror and Safari users can just click the Reload button.
- Chrome: press Ctrl+F5 or Shift+F5
// <nowiki>
var TEMPLATE_REMOVER_DATA = {
templates: [
{
name: "DR",
replaceWith: "-----"
}
],
//pageExclusion: (page) => {
// return page.ns === 10 // Returns `true` if the namespace is template (10), meaning this skips over all template pages
//}
}
// ***************************** Helper functions
// Stolen from stack overflow
function hexToRgbA_customAlpha(hex, alpha){
var r = parseInt(hex.slice(0, 2), 16),
g = parseInt(hex.slice(2, 4), 16),
b = parseInt(hex.slice(4, 6), 16);
if (alpha) {
return "rgba(" + r + ", " + g + ", " + b + ", " + alpha + ")";
} else {
return "rgb(" + r + ", " + g + ", " + b + ")";
}
}
// </nowiki>