Last active
August 20, 2018 16:37
-
-
Save rubenrivera/12931eb6dc266f7074b22fa8b3f17d1f to your computer and use it in GitHub Desktop.
Functión autoejecutable para evitar la traducción del nombre de un complemento en el título de un post de Blogger. Inclúyase al inicio del post en la vista HTML y modifique los valores de addonName y newAddonName
This file contains 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
<script> | |
(function(){ | |
var addonName = 'Visor de Registros'; | |
var newAddonName = 'Visor de Registros'; | |
var dTitle = document.querySelector('title'); | |
dTitle.classList.add('notranslate'); | |
dTitle.setAttribute('translate','no'); | |
var eTitle = document.querySelector('.post-title,.entry-title'); | |
var title = eTitle.innerHTML.replace(addonName,'<span class="notranslate" translate="no">newAddonName</span>'); | |
eTitle.innerHTML = title; | |
})(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment