Skip to content

Instantly share code, notes, and snippets.

@skipjac
Created October 8, 2014 04:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skipjac/b2963f323836449ddf0f to your computer and use it in GitHub Desktop.
Save skipjac/b2963f323836449ddf0f to your computer and use it in GitHub Desktop.
hijack Zendesk's notification system
$(document).ready(function() {
if ( $('.promoted-articles ul li a:contains("Issue")').length > 0 ){
console.log( $('.promoted-articles ul li a:contains("Issue")').first().parent().html());
$('.notification-text').html(
'<i class="fa fa-warning"></i> ' +
$('.promoted-articles ul li a:contains("Issue")').first().parent().html()
);
$('.notification').show();
}
<div style="display: none;">{{promoted_articles}}</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment