Hello people
I want to edit the code that I am currently using, but now I want a menu to be added to the right that already contains the labels to use as the title.
I want to edit the code that I am currently using, but now I want a menu to be added to the right that already contains the labels to use as the title.
- Spoiler:
- Code:
var prefijos = {
init: function () {
var a = document.getElementsByTagName('a'),
len = a.length;
for (var i = 0; i < len; i++) {
var e = a[i].innerHTML;
if (/\[([^\[\]]+)\]/.test(e) && !/logout/.test(a[i].id)) {
var f = e.match(/\[(.*?)\]/)[1].toLowerCase().replace(/\W+/g, '-'),
g = e.match(/\[(.*?)\]/)[1].toLowerCase(),
k = e.replace(/\[.*?\]/, '<span class="prefijo ' + f + '">' + g + '</span>');
a[i].innerHTML = k;
e.match(/\[(.*?)\]/g).length > 0 ? prefijos.init() : '';
}
}
},
copyright: function () {
console.log('Por Chalo, para http://www.opensourcephpbb3.com');
},
};
$(function () {
prefijos.init()
});