Last active
December 27, 2015 18:49
-
-
Save alnutile/7373106 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Re-apply superscript to registered-mark after Gardens removes them. | |
*/ | |
jQuery(document).ready(function ($) { | |
var replaceCharacters = function(target) { | |
var pagerButtonTxt = ''; | |
var pagerButtonTxt = $(target).html(). | |
replace(/®/gi, '<sup>®</sup>'). | |
replace(/®/gi, '<sup>®</sup>'). | |
replace('<sup><sup>®</sup></sup>', '<sup>®</sup>'); | |
return pagerButtonTxt; | |
} | |
if ($("body.not-front a.page-previous").length) { | |
var target = $("body.not-front a.page-previous"); | |
var pagerButtonTxt = replaceCharacters(target) | |
$(target).html(pagerButtonTxt); | |
} | |
if ($("body.not-front a.page-next").length) { | |
var target = $("body.not-front a.page-next"); | |
var pagerButtonTxt = replaceCharacters(target) | |
$(target).html(pagerButtonTxt); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment