Changes for page 万维

Last modified by Jiahao Lai on 2026/04/02 09:18

From version 5.1
edited by Jiahao Lai
on 2026/04/02 09:18
Change comment: There is no comment for this version
To version 3.1
edited by Jiahao Lai
on 2026/03/26 15:42
Change comment: There is no comment for this version

Summary

Details

XWiki.JavaScriptExtension[0]
Caching policy
... ... @@ -1,1 +1,0 @@
1 -default
Code
... ... @@ -1,34 +1,0 @@
1 -require(['jquery'], function($) {
2 - // console.log("浏览器窗口的高度:" + window.innerHeight);
3 -//console.log("浏览器窗口的宽度:" + window.innerWidth);
4 - if( (window.innerWidth) > (window.innerHeight)){
5 -
6 - if($(body).height() > $(window).height()){
7 - $("#rightPanels").css({"left": "83.33333333333334%","position" : "fixed", "height" : "95%" , "top" : "15%","overflow" : "auto"});
8 -
9 - }else{
10 - $("#rightPanels").css({"left": "83.33333333333334%","position" : "fixed", "height" : $(contentcontainer).height(), "top" : "15%","overflow" : "auto"});
11 - }
12 -
13 - var intervalId = window.setInterval(function(){
14 - if($(body).height() < $(window).height()){
15 - $("#rightPanels").css({"left": "83.33333333333334%","position" : "fixed", "height" : $(contentcontainer).height() , "top" : "10%","overflow" : "auto"});
16 - }
17 -
18 -}, 200);
19 -
20 -
21 -$(window).scroll(function() {
22 - var scrollYpos = $(document).scrollTop();
23 - if($(body).height() > $(window).height()){
24 - if (scrollYpos > 50) {
25 - $("#rightPanels").css({"left": "83.33333333333334%","position" : "fixed", "height" : "100%" , "top" : "0%","overflow" : "auto"});
26 - }
27 - else {
28 - $("#rightPanels").css({"left": "83.33333333333334%","position" : "fixed", "height" : $(window).height() * 0.95 + scrollYpos , "top" : 100 -scrollYpos,"overflow" : "auto"});
29 - }
30 - }
31 -});
32 -
33 - }
34 -});
Use this extension
... ... @@ -1,1 +1,0 @@
1 -always
Name
... ... @@ -1,1 +1,0 @@
1 -pintoc