Solved: 4 Years, 2 Months, 3 Weeks ago Custom Online Location
#4
Solved: 4 Years, 2 Months, 3 Weeks ago
So this script worked. Thank you!! My only thing is that it's not capitalizing the name of the page. How would I make it do that? I see that it should be but it's not.

<script type="text/javascript">
jQuery(document).ready(function(){
    jQuery(jQuery('a:contains("Unknown Location")')).each(function () {
        jQuery(this).addClass('unknown'); // Just to capitalize the name, found easy with CSS
        var page = (jQuery(this).attr('href')); // Fetch the link
        page = page.substr(page.lastIndexOf("/") + 1);
        page = page.substr(0, page.lastIndexOf('.')) || page;
        jQuery(this).before('Viewing ').html(page); // Change linked text and prepend text 'Viewing' before it.
    });
});
</script>
Reply


Messages In This Thread
Custom Online Location - by jesuite - 2016-07-01, 05:32 PM
RE: Custom Online Location - by jesuite - 2016-07-03, 01:49 AM
RE: Custom Online Location - by .m. - 2016-07-03, 02:15 AM
RE: Custom Online Location - by jesuite - 2016-07-04, 04:20 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)