I found this code snipet:
<script>
function disableWatchers() {
setTimeout(disableWatchers, 1000);
if ( $('#notifyWatchers').attr( "mz" ) != 1) {
setTimeout(function() {$('#notifyWatchers').removeAttr('checked');}, 1000);
$('#notifyWatchers').attr( "mz", 1);
}
}
disableWatchers();
</script>
I have add this to the custom HTML options but i dont want the script on all sites just on them with a label like "unsubscribe" but i don't know where i find the current tags from the site in the edit frame.
Is is there a simple way to read the tags in the java script?
I want something like this:
<script>
function disableWatchers() {
setTimeout(disableWatchers, 1000);
if ( $('#notifyWatchers').attr( "mz" ) != 1) {
setTimeout(function() {
//A simple check if the Label "unsubscribe" is set to this page
if(SiteLabels.indexOf("unsubscribe")){$('#notifyWatchers').removeAttr('checked');}
}, 1000);
$('#notifyWatchers').attr( "mz", 1);
}
}
disableWatchers();
</script>
Any ideas?
<script>
function disableWatchers() {
if("12911684" == AJS.Confluence.getContentId())
{
$('#notifyWatchers').removeAttr('checked');
}
setTimeout(function(){disableWatchers();},1000);
}
disableWatchers();
</script>
ok this works great but i dont use labels i use the ContentId from the page.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.