gitbook-plugin-lock
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -22,2 +22,3 @@ require(['gitbook', 'jQuery'], function(gitbook, $) { | ||
var cla = document.getElementsByClassName("page-inner"); | ||
console.log(cla,"看看cla是啥") | ||
@@ -28,7 +29,8 @@ // const $article = $(".page-inner"); | ||
const article = cla[0], height = article.clientHeight; | ||
console.log(article,"看看",height) | ||
// 文章隐藏后的高度 | ||
const halfHeight = height * 0.3; | ||
console.log("看看---->",halfHeight) | ||
cla.css('height', halfHeight + 'px'); | ||
cla.setAttribute('height', halfHeight + 'px'); | ||
// cla.addClass('lock'); | ||
@@ -35,0 +37,0 @@ cla.classList.add("lock"); |
{ | ||
"name": "gitbook-plugin-lock", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Gitbook 页面加锁", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
5221
79