New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gitbook-plugin-lock

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitbook-plugin-lock - npm Package Compare versions

Comparing version 0.0.51 to 0.0.52

26

assets/lock.js

@@ -6,11 +6,11 @@ require(['gitbook', 'jQuery'], function(gitbook, $) {

let verificationCode;
let thisCode;
let thisValue;
function insertPageLock() {
let authToken= localStorage.getItem("auth-token")
console.log(authToken)
let authToken= localStorage.getItem("lock-token")
if (authToken!==isNaN(0)||authToken!==""||authToken!==undefined) {
for (let i in verificationCode) {
console.log(authToken,verificationCode[i])
if (i === authToken) {
for (let i in verificationCode) {
if (verificationCode[i]["value"] === authToken) {
return true;

@@ -22,10 +22,10 @@ }

const cla = document.getElementById("book-search-results");
console.log(cla,"看看cla是啥")
// console.log(cla,"看看cla是啥")
// 文章的实际高度
const article = cla, height = article.scrollHeight;
console.log(article,"看看",height)
// console.log(article,"看看",height)
// 文章隐藏后的高度
const halfHeight = height * 0.5;
console.log("看看---->",halfHeight)
// console.log("看看---->",halfHeight)

@@ -41,3 +41,3 @@ cla.style.height= halfHeight + 'px';

' <div>\n' +
' <span>发送 </span><span class="token" style="color: #e9415a; font-weight: bold; font-size: 17px; margin-bottom: 45px;">1024</span>\n' +
' <span>发送 </span><span class="token" style="color: #e9415a; font-weight: bold; font-size: 17px; margin-bottom: 45px;">'+thisCode+'</span>\n' +
' </div>\n' +

@@ -65,4 +65,4 @@ ' <div>\n' +

const val = document.getElementById('btw-modal-input').value
alert(val+typeof val)
if ( val===1024 || val === '1024') {
alert(val+typeof val+thisValue)
if (val === thisValue) {
cla.style.height= height + 'px';

@@ -83,2 +83,6 @@ cla.style.overflow= 'visible';

const rand = Math.floor(Math.random() * verificationCode.length)
thisCode = verificationCode[rand]["key"]
thisValue = verificationCode[rand]["value"]
console.log(rand,"+",thisCode,"+",thisValue)
insertPageLock();

@@ -85,0 +89,0 @@ });

{
"name": "gitbook-plugin-lock",
"version": "0.0.51",
"version": "0.0.52",
"description": "Gitbook 页面加锁",

@@ -46,3 +46,3 @@ "main": "index.js",

"required": true,
"type": "object"
"type": ["object"]
}

@@ -49,0 +49,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc