Skip to content

Instantly share code, notes, and snippets.

@KevCui
Last active April 16, 2017 14:24
Show Gist options
  • Save KevCui/3e384f43be6b79e6906cface83bbf7db to your computer and use it in GitHub Desktop.
Save KevCui/3e384f43be6b79e6906cface83bbf7db to your computer and use it in GitHub Desktop.
Punycode url highlight
// ==UserScript==
// @name punycode url highlight
// @include *
// @grant none
// ==/UserScript==
(function() {
'use strict';
var url= window.location.href;
if (url.indexOf("xn--") != -1) {
document.body.insertAdjacentHTML("afterbegin", '<span style="color: red; background: yellow; position: fixed">Punycode url: '+ url + '</span>');
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment