hexo-mrzefr-filebed
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -73,3 +73,3 @@ let mr = {}; | ||
} | ||
//跳转 | ||
//点击及加载 | ||
$('#menu-home').on('click',function(){window.location.href = window.location.origin;}); | ||
@@ -80,2 +80,13 @@ $('#menu-archives').on('click',function(){window.location = "/archives/";}); | ||
$('#menu-random').on('click',function(){window.location = "/random/";}); | ||
$('#menu-copy').on('click',function(){mr.copySelect();}); | ||
$('#menu-backward').on('click',function(){window.history.back();}); | ||
$('#menu-forward').on('click',function(){window.history.forward();}); | ||
$('#menu-refresh').on('click',function(){window.location.reload();}); | ||
$('#menu-up').on('click',function(){mr.scrollToTop();}); | ||
$('#menu-baidu').on('click',function(){mr.searchBaidu();}); | ||
$('#menu-comment').on('click',function(){mr.comment();}); | ||
$('#menu-dark').on('click',function(){mr.switchDarkMode();}); | ||
$('#menu-tidio').on('click',function(){mr.openTidio();}); | ||
$('#menu-copypage').on('click',function(){mr.copyPageUrl();}); | ||
$('#menu-mirror').on('click',function(){mr.Mirror();}); | ||
//copyurl | ||
@@ -233,2 +244,23 @@ mr.copyUrl = function(id) { | ||
}; | ||
//镜像站跳转 | ||
mr.Mirror = function() { | ||
let pathname; | ||
let hostname; | ||
let url; | ||
pathname = window.location.pathname; | ||
hostname = window.location.hostname; | ||
if (hostname === 'www.mrzefr.cn') { | ||
url = "https://mrzefr-hexo.vercel.app" + pathname; | ||
btf.snackbarShow("即将前往MrZeFr的小窝分站!"); | ||
window.location.href = url; | ||
} | ||
else if(hostname === 'mrzefr-hexo.vercel.app') { | ||
url = "https://www.mrzefr.cn" + pathname; | ||
btf.snackbarShow("正在返回MrZeFr的小窝!"); | ||
window.location.href = url; | ||
} | ||
else { | ||
btf.snackbarShow("本地调试不需要跳转哦!"); | ||
} | ||
} | ||
//关闭右键菜单 | ||
@@ -251,2 +283,3 @@ function mrmenuOff(){ | ||
//提示log | ||
console.log(' %c 右键菜单开启成功! ', 'color: #fff; background: #2dce89; padding:5px;') | ||
console.log(' %c 右键菜单开启成功! ', 'color: #fff; background: rgb(224, 108, 30); padding:5px;') | ||
{ | ||
"name": "hexo-mrzefr-filebed", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Hello World", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
247453
768