Skip to content

Instantly share code, notes, and snippets.

@siliconwafer
Last active July 27, 2021 15:02
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 siliconwafer/774f206a8ca74df658eeeee27eb648d8 to your computer and use it in GitHub Desktop.
Save siliconwafer/774f206a8ca74df658eeeee27eb648d8 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
const domain_name = 'asarinomisosoup.com'
const entries = document.getElementsByClassName('entry-content')
if (entries.length > 0 && entries[0] != undefined) {
var contents = entries[0].innerHTML
const prev = contents;
// www subdomain
contents = contents.split('www.'+domain_name).join(domain_name)
// Yahoo!Blog
contents = contents.replace(/https?:\/\/blogs.yahoo.co.jp\/asari_no_miso_soup\/(\d+)\.html?/g, 'https://'+domain_name+'/entry/$1')
//
if (prev != contents) {
entries[0].innerHTML = contents
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment