From c8f162d0bb48470d5cf4a8714ef81083e66c2113 Mon Sep 17 00:00:00 2001 From: gorhill Date: Mon, 11 May 2015 11:53:02 -0400 Subject: [PATCH] punycode scope selector --- src/js/popup.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/js/popup.js b/src/js/popup.js index 5293f5e..b41e061 100644 --- a/src/js/popup.js +++ b/src/js/popup.js @@ -1029,9 +1029,9 @@ function initScopeCell() { if ( matrixSnapshot.hostname === matrixSnapshot.domain ) { uDom('#scopeKeySite').css('display', 'none'); } else { - uDom('#scopeKeySite').text(matrixSnapshot.hostname); + uDom('#scopeKeySite').text(punycode.toUnicode(matrixSnapshot.hostname)); } - uDom('#scopeKeyDomain').text(matrixSnapshot.domain); + uDom('#scopeKeyDomain').text(punycode.toUnicode(matrixSnapshot.domain)); updateScopeCell(); } @@ -1039,7 +1039,9 @@ function updateScopeCell() { uDom('body') .removeClass('tScopeGlobal tScopeDomain tScopeSite') .addClass(getClassFromScope()); - uDom('#scopeCell').text(matrixSnapshot.scope.replace('*', '\u2217')); + uDom('#scopeCell').text( + punycode.toUnicode(matrixSnapshot.scope).replace('*', '\u2217') + ); } /******************************************************************************/