feat: 1.1.2 兼容服务端渲染
This commit is contained in:
parent
ec4cdc8c4b
commit
123bee623e
@ -39,3 +39,6 @@
|
|||||||
## 0.1.1
|
## 0.1.1
|
||||||
1. 增加history.back 之后跳转默认页的延迟
|
1. 增加history.back 之后跳转默认页的延迟
|
||||||
2. 优化ondeltoolopen 逻辑
|
2. 优化ondeltoolopen 逻辑
|
||||||
|
|
||||||
|
## 0.1.2
|
||||||
|
1. 加上document的判断 以适应服务端渲染 npm 调用
|
@ -178,7 +178,7 @@ disableDevtool(options);</code></p>
|
|||||||
<script
|
<script
|
||||||
disable-devtool-auto
|
disable-devtool-auto
|
||||||
md5='1aabac6d068eef6a7bad3fdf50a05cc8'
|
md5='1aabac6d068eef6a7bad3fdf50a05cc8'
|
||||||
src='https://cdn.jsdelivr.net/npm/disable-devtool@0.1.1/disable-devtool.min.js#use'
|
src='https://cdn.jsdelivr.net/npm/disable-devtool@0.1.2/disable-devtool.min.js#use'
|
||||||
></script>
|
></script>
|
||||||
<!-- <script disable-devtool-auto md5='1aabac6d068eef6a7bad3fdf50a05cc8' src='./npm/disable-devtool.min.js'></script> -->
|
<!-- <script disable-devtool-auto md5='1aabac6d068eef6a7bad3fdf50a05cc8' src='./npm/disable-devtool.min.js'></script> -->
|
||||||
<script>
|
<script>
|
||||||
|
2
npm/disable-devtool.min.js
vendored
2
npm/disable-devtool.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "disable-devtool",
|
"name": "disable-devtool",
|
||||||
"version": "0.1.1",
|
"version": "0.1.2",
|
||||||
"description": "Disable web developer tools from the f12 button, right-click and browser ",
|
"description": "Disable web developer tools from the f12 button, right-click and browser ",
|
||||||
"main": "disable-devtool.min.js",
|
"main": "disable-devtool.min.js",
|
||||||
"unpkg": "disable-devtool.min.js",
|
"unpkg": "disable-devtool.min.js",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "disable-devtool",
|
"name": "disable-devtool",
|
||||||
"version": "0.1.1",
|
"version": "0.1.2",
|
||||||
"description": "Disable web developer tools from the f12 button, right-click and browser ",
|
"description": "Disable web developer tools from the f12 button, right-click and browser ",
|
||||||
"main": "disable-devtool.min.js",
|
"main": "disable-devtool.min.js",
|
||||||
"unpkg": "disable-devtool.min.js",
|
"unpkg": "disable-devtool.min.js",
|
||||||
|
@ -78,6 +78,9 @@ function initDevTool () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function checkScriptUse () {
|
function checkScriptUse () {
|
||||||
|
if (typeof document === 'undefined') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
let dom = document.querySelector('[disable-devtool-auto]');
|
let dom = document.querySelector('[disable-devtool-auto]');
|
||||||
if (!dom) {
|
if (!dom) {
|
||||||
return;
|
return;
|
||||||
|
@ -1 +1 @@
|
|||||||
export default '0.1.1';
|
export default '0.1.2';
|
Loading…
x
Reference in New Issue
Block a user