I want a script to wright on all closed topics ex: "This topic is now closed to further replies."
Last edited by Mati on September 29th 2015, 5:34 pm; edited 1 time in total
$(function() {
var locked = 'http://i21.servimg.com/u/f21/16/89/96/68/locked10.png',
message = 'This topic is now closed to further replies.',
reply = $('.i_reply')[0],
main = document.getElementById('main-content'),
node;
if (reply && reply.src == locked) {
node = document.createElement('DIV');
node.className = 'notice_locked';
node.innerHTML = message;
main && main.insertBefore(node, main.firstChild);
}
});
$(function() {
var locked = 'http://i21.servimg.com/u/f21/16/89/96/68/locked10.png',
message = 'This topic is now closed to further replies.',
reply = $('.i_reply')[0],
main = document.getElementById('main-content'),
quick = document.anchors.quickreply,
node;
if (reply && reply.src == locked) {
node = document.createElement('DIV');
node.className = 'notice_locked';
node.innerHTML = message;
if (main && quick) main.insertBefore(node, quick);
}
});