Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function removeTrailingDashes() {
- jQuery(".post-title.column-title strong").each(function() {
- //console.log(jQuery(this).html());
- jQuery(this).html(jQuery(this).html().replace(/(.*) - (<span class="post-state".*<\/span>)$/g, "$1$2"));
- });
- }
- removeTrailingDashes();
- jQuery("#status-hide").click(function() {
- var postStateSpan = jQuery(".post-title.column-title .post-state");
- postStateSpan.toggle(!this.checked);
- if (!this.checked) {
- postStateSpan.before(" - ");
- } else {
- removeTrailingDashes();
- }
- });
Add Comment
Please, Sign In to add comment