参考http://www.right.com.cn/forum/thread-261702-1-1.html

vim /home/ihid/chaos_calmer/feeds/luci/modules/luci-base/root/etc/config/luci

修改sessiontime为自定义数值:

config internal sauth
option sessionpath "/tmp/luci-sessions"
option sessiontime 3600

修改/home/ihid/chaos_calmer/feeds/luci/themes/luci-theme-violet/luasrc/view/themes/violet/header.htm文件(取决于你用的是哪个主题),在里面添加一个js函数解决问题 :

<script>
var lastTime = new Date().getTime();
var currentTime = new Date().getTime();
var timeOut = 20 * 60 * 1000; window.onload=function (){
window.document.onmousemove=function(){
lastTime = new Date().getTime();
}
};
function testTime(){
currentTime = new Date().getTime();
if(currentTime - lastTime > timeOut){
console.log("TimeOut");
var tmp = 0;
document.onmousedown=function(event){
if (tmp == 0){
alert("操作超时,请重新登录!");
window.location.href="/cgi-bin/luci";
tmp = 1;
}
}
document.onkeydown=function(event){
if (tmp == 0){
alert("操作超时,请重新登录!");
window.location.href="/cgi-bin/luci";
tmp = 1;
}
}
}
} window.setInterval(testTime, 1000);
</script>

最新文章

  1. C#图像处理笔记
  2. java-集合1
  3. iOS 模仿微信的照片选择器
  4. BZOJ 2287: 【POJ Challenge】消失之物( 背包dp )
  5. xamarin跨平台iOS、Android 与Windows
  6. webkit的几个属性
  7. Android之XListView下拉刷新,更新网络美女图
  8. 【转】JavaScript中使用ActiveXObject操作本地文件夹的方法
  9. #include、#import与@class的使用与头文件循环引用问题
  10. mysql修改连接数
  11. gcc编译参数详解一(-ffunction-sections -fdata-sections)
  12. Asp.net 获取访问者IP
  13. 设计模式之备忘录模式(Memento )
  14. 8 -- 深入使用Spring -- 6...3 使用@Transactional
  15. mybatis源码解析2---SqlSessionFactoryBuilder、SqlSessionFactory解析
  16. php优秀框架codeigniter学习系列——index.php
  17. CentOS7系统更换YUM Repo源
  18. HTML 之前未接触过的标签
  19. 【整理】STL中的bitset(二进制华丽解决假五维偏序题)
  20. 【ZZ】浅谈大型web系统架构 | 菜鸟教程

热门文章

  1. ARC以及MRC中setter方法的差异
  2. eclipse通过maven进行打包并且对hdfs上的文件进行wordcount
  3. 新款Macbook 安装任意来源软件教程 mac软件下载资源推荐
  4. TortoiseGit基本操作
  5. yii2.0查询关联数据以及widgets小部件
  6. ZT 苍天助曹不助汉哪
  7. 看了xici有写给孩子的信,maybe我也要写给孩子一些东西了
  8. OC基础数据类型-NSString
  9. github基本概念
  10. 【[USACO08NOV]奶牛混合起来Mixed Up Cows】