diff --git a/dist/show-site-all-userjs.gf.user.js b/dist/show-site-all-userjs.gf.user.js index 3ad765c..0031a46 100644 --- a/dist/show-site-all-userjs.gf.user.js +++ b/dist/show-site-all-userjs.gf.user.js @@ -46,7 +46,7 @@ var FetchUserjs = function () { this.homeUrl = 'https://greasyfork.org/zh-CN/scripts/24508'; this.api = 'https://greasyfork.org/en/scripts/by-site/{host}.json'; - this.host = location.host.split('.').splice(-2).join('.'); + this.host = location.hostname.split('.').splice(-2).join('.'); this.showTime = 10; this.quietKey = 'jae_fetch_userjs_quiet'; this.cacheKey = 'jae_fetch_userjs_cache'; diff --git a/dist/show-site-all-userjs.user.js b/dist/show-site-all-userjs.user.js index c8cd385..2aa1392 100644 --- a/dist/show-site-all-userjs.user.js +++ b/dist/show-site-all-userjs.user.js @@ -46,7 +46,7 @@ var FetchUserjs = function () { this.homeUrl = 'https://greasyfork.org/zh-CN/scripts/24508'; this.api = 'https://greasyfork.org/en/scripts/by-site/{host}.json'; - this.host = location.host.split('.').splice(-2).join('.'); + this.host = location.hostname.split('.').splice(-2).join('.'); this.showTime = 10; this.quietKey = 'jae_fetch_userjs_quiet'; this.cacheKey = 'jae_fetch_userjs_cache'; diff --git a/userscript/main.js b/userscript/main.js index f8b426f..bbcd4e3 100644 --- a/userscript/main.js +++ b/userscript/main.js @@ -2,7 +2,7 @@ class FetchUserjs { constructor() { this.homeUrl = 'https://greasyfork.org/zh-CN/scripts/24508'; this.api = 'https://greasyfork.org/en/scripts/by-site/{host}.json'; - this.host = location.host.split('.').splice(-2).join('.'); + this.host = location.hostname.split('.').splice(-2).join('.'); this.showTime = 10; this.quietKey = 'jae_fetch_userjs_quiet'; this.cacheKey = 'jae_fetch_userjs_cache';