惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

腾讯CDC
N
Netflix TechBlog - Medium
aimingoo的专栏
aimingoo的专栏
P
Proofpoint News Feed
F
Fortinet All Blogs
大猫的无限游戏
大猫的无限游戏
I
InfoQ
V
V2EX
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
有赞技术团队
有赞技术团队
G
Google Developers Blog
L
LangChain Blog
博客园_首页
M
MIT News - Artificial intelligence
H
Hackread – Cybersecurity News, Data Breaches, AI and More
月光博客
月光博客
IT之家
IT之家
量子位
宝玉的分享
宝玉的分享
S
SegmentFault 最新的问题
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
雷峰网
雷峰网

又见苍岚

COLMAP PatchMatch Stereo 算法详解 事件驱动的状态机框架:从理论到工程实践 Git 在国内网络环境下无法 Push 的排查与修复 —— 配置 Clash 代理 分段五次多项式插值原理详解 路径插值方法深度对比研究 Claude Code 使用指南 OpenClaw 记忆管理与技能创建指南 CBS(Conflict-Based Search)算法详解 A* 算法及其变种详解 OpenClaw 配置多 Agents Windows Powershell 无法加载文件,因为在此系统上禁止运行脚本问题的解决方案 MaxClaw 安装流程 大模型 AI 名词介绍 AList 网盘聚合工具简介 Protobuf 简介与测试 Claude Code 简介以及 GLM 4.7 模型接入 Github 歌词下载工具 163MusicLyrics Python __getattr__ 懒加载 Python TypedDict 机器人仿真平台 Gazebo 安装记录 机器人仿真平台 Gazebo 简介 多机器人路径规划问题(Multi-Agent Path Finding, MAPF)简介 Python exifread 读取修改过的 jpeg 信息错误问题修复 3D 坐标系变换的理解 3D 旋转矩阵基本概念 MongoDB Compass 介绍 Python 环境管理工具 uv Flutter 开发指南 Snipaste 安装下载与黑屏问题解决方案 全局路径规划算法记录
自定义网页右键菜单
Yiwei Zhang · 2024-01-17 · via 又见苍岚
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58

<link rel="stylesheet" href="/css/right_click_style.css">
<script src='https://s1.pstatp.com/cdn/expire-1-M/jquery/1.10.2/jquery.min.js'></script>

<script>
(function(){var that;var arr=new Array();var html="";!function(e){e.RMenu={init:function(per){if(typeof(per)!="object"&&!per.hasOwnProperty('area')&&!per.hasOwnProperty('items')&&!per.hasOwnProperty('callback'))throw"json 数据错误";that=this;this.showmenu(per);var areaHeight=$(per.area).height();var areaWidth=$(per.area).width();var menuHeight=$('.RCM-Main').height();var menuWidth=$('.RCM-Main').width();$(per.area).bind('contextmenu',function(event){

// 检查是否按下了Ctrl键
if (event.ctrlKey) {
console.log("test");
return true;
} else {
var xPos=parseInt(event.pageX+10);var yPos=event.pageY;if(areaWidth-xPos<menuWidth){xPos=(xPos-menuWidth-20);$('.RCM-container').css({left:(xPos-menuWidth-20)+"px",top:yPos+"px"}).show();
}
}
if(areaHeight-yPos<menuHeight){yPos=(yPos-menuHeight-20);}
$('.RCM-Main').css({left:xPos+"px",top:yPos+"px"}).show();return false;})
$(per.area).on('click',function(){$('.RCM-container').hide();});$('.RCM-container li').on('click',function(){var content=$(this).data('content');$('.RCM-container').hide();per.callback({event:'click',data:content});});$('.RCM-container ul li,.RCM-child li').mouseover(function(e){if($(this).find('i').hasClass('fa-align-right')){var width=$(this).find('i').next('.RCM-child').width();$(this).find('i').next('.RCM-child').css('left',width).show();}});$('.RCM-container ul li,.RCM-child li').mouseout(function(){$('.RCM-child').hide();});},contextMenu:function(per,key){var key=key?key:"Main";html+='<div class="RCM-container RCM-'+key+'"><ul>';$.each(per.items,function(item,val){var icon=val.icon?'<i class="fa fa-'+val.icon+' fa-fw ">&nbsp;':''
var center=val.icon?'nocenter':'textcenter';var iconAfter=val.items?'<i class="fa fa-chevron-right fa-fw fa-align-right">&nbsp;':'';html+='<li data-content='+item+' class="'+center+'">'+icon+'</i>'+val.name+iconAfter+'</i>';if(val.hasOwnProperty('items')){that.contextMenu(val,'child');}
html+='</li>';});html+="</ul></div>";return html;},showmenu:function(per){var ce=this.contextMenu(per);$(per.area).append(ce);$('.RCM-container').hide();}};}(window)})();

</script>

<script>
$(document).ready(function(){
var rcm = window.RMenu;
rcm.init({
area:'body',
items:{
"edit":{name:"编辑",icon:'edit'},
"del":{name:"删除",icon:'trash-o'},
"add":{name:"添加",icon:'plus',items:{
"new-text":{name:"添加文件",icon:'file-text'},
"new-zip":{name:"添加ZIP",icon:'file-zip-o'}
}},
"refresh":{name:"刷新",icon:'refresh'},
"down":{name:"下载按钮",icon:'cloud-download'},
"new":{name:"新建",icon:'file',items:{
"new-text":{name:"新建文件",icon:'file-text'},
"new-zip":{name:"新建ZIP",icon:'file-zip-o'}
}}
},
callback:function(res){
if(res.data == 'edit'){
console.log('点击了edit');
}else if(res.data == 'del'){
console.log('点击了del');
}else if(res.data == 'add'){
console.log('点击了add');
}else if(res.data == 'refresh'){
window.location.reload();
}else if(res.data == 'down'){
console.log('点击了download');
}
}
})
});
</script>