Last active
April 16, 2017 14:24
-
-
Save KevCui/3e384f43be6b79e6906cface83bbf7db to your computer and use it in GitHub Desktop.
Punycode url highlight
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
// ==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