by Ape April 23rd 2016, 2:58 pm
Find this in the code and place your own colors in the place of this
- Code:
myGroups = ['#990099', '#CC0000'];
so where it has
#990099 change it to your red color.
Now to add the code in the widget you need to find this button on the editor >>
click it so it looks like this >>
Now add your code and save
it should look something like this
- Code:
<script type="text/javascript">
myGroups = ['#FF0000', '#CC0000'];
groups_cache_time = 4*60*1000; // mm*ss*ms;
</script>
<div id="theGroups"></div>
<div id="theGroupsContent" style="display:none"></div>
<noscript><div style="color:red;font-size:9px">Functionality of this widget is not possible, as JavaScript is disabled or unsupported.</div></noscript>
<script type="text/javascript">
if (localStorage.groupOn && localStorage.groupEx > +new Date - group_cache_time) jQuery('#theGroups').html(localStorage.groupOn);
else loadStaff();
function loadStaff() {
jQuery.get('/viewonline', function(d) {
for (var groups = document.getElementById('theGroups'), a = jQuery('#main-content a, a.gen', d), i = 0, j = a.length; i<j; i++) {
for (var k = 0, l = myGroups.length; k < l; k++) {
if (a[i].style.color.toLowerCase() == myGroups[k].toLowerCase()) {
$(a[i]).appendTo(groups).wrap('<div class="myGroup">');
}
}
}
if (!jQuery('#theGroups .myGroup').length) jQuery('#theGroups').html('No groups online');
if (window.localStorage) {
localStorage.groupOn = groups.innerHTML;
localStorage.groupEx = +new Date;
}
})
}
</script>