当前位置:网站首页>实用代码使用浏览器添加书签方式来一键获取网页所需内容链接技巧分享
实用代码使用浏览器添加书签方式来一键获取网页所需内容链接技巧分享
2022-08-07 14:48:00 【义含-遗憾】
说明
有时候需要复制当前网页的标题和网址来想分享一下,
比如看到一个有意思的文章或者网站。
部分浏览器会自带这个功能,
但是我还是喜欢很酷得呢
下面采用浏览器书签来获取网页所需内容链接
代码
复制网页标题
javascript:(function(){ const el = document.createElement('textarea'); el.value = decodeURIComponent(document.title); document.body.appendChild(el); el.select(); document.execCommand('copy'); document.body.removeChild(el); })();复制标题+链接
javascript:(function(){ const el = document.createElement('textarea'); el.value = decodeURIComponent(document.title + '\n' + document.URL); document.body.appendChild(el); el.select(); document.execCommand('copy'); document.body.removeChild(el); })();网页夜间模式
javascript:var a=document.createElement('div');a.innerHTML='<div style="position:fixed;background-color:#000;top:0;left:0;z-index:999999;pointer-events:none;opacity:0.35;width:100%;height:100%"></div>';document.body.appendChild(a);显示明文密码
javascript:var intput = document.getElementsByTagName('Input');for(var i=0;i<intput.length;i++) {if(intput[i].type.toUpperCase()=='PASSWORD'){intput[i].setAttribute("type","text");}}解除网页限制
javascript:"use strict";!function(){var t=function(t){t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation()};["copy","cut","contextmenu","selectstart","mousedown","mouseup","keydown","keypress","keyup"].forEach(function(e){document.documentElement.addEventListener(e,t,{capture:!0})}),alert("解除限制成功啦!")}();网页内容自由在线编辑
javascript:"use strict";!function(){"true"===document.body.getAttribute("contenteditable")?(document.body.setAttribute("contenteditable",!1),alert("网页不能编辑啦!")):(document.body.setAttribute("contenteditable",!0),alert("网页可以编辑啦!"))}();网页分屏
javascript:(function(w,d){var href=location.href;var website=w.prompt('请输入网址','http://')||href;d.write('<HTML><HEAD></HEAD><FRAMESET COLS=\'50%,*\'><FRAME SRC='+location.href+'><FRAME SRC='+website+'></FRAMESET></HTML>');})(window,document)边栏推荐
- LeetCode 热题 HOT 100(1.两数之和)
- dotnet 线程静态字段
- 哈希表 | 三数之和、四数之和 | 用`双指针法`最合适 | leecode刷题笔记
- 微信自动发卡机器人说明
- C专家编程 第8章 为什么程序员无法分清万圣节和圣诞节 8.3 在等待时类型发生了变化
- go优先级队列实现
- mysql连接WARN: Establishing SSL connection without server‘s identity verification is not recommended.
- GCB | 华中农大刘玉荣组在海拔梯度下土壤碳周转领域取得系列新进展
- Postgresql logical backup tool pg_dump and pg_resotre learning
- 俩日总结(【18】、【19】)
猜你喜欢
![[Principle of Database System] Chapter 3 BC Normal Form, Third Normal Form and Fourth Normal Form](/img/1a/e97745e62287fcf494d1479deaa632.png)
[Principle of Database System] Chapter 3 BC Normal Form, Third Normal Form and Fourth Normal Form

雷达的分辨率
——Pinctrl介绍](/img/48/fe4b353fb5b369ee7c17c0b738a7b0.png)
[21天学习挑战赛——内核笔记](三)——Pinctrl介绍

Radar resolution

LeetCode 热题 HOT 100(7.盛最多水的容器)

The location identified by the @RequestMapping annotation

联盛德W801系列1-flash保存数据例程:保存wifi配网信息

004_Eureka注册中心

2022牛客多校六 A-Array(构造+哈夫曼)

【数据库系统原理】第四章 高级数据库模型:弱实体集、E/R 联系到关系的转化、子类结构到关系的转化
随机推荐
Hash table | 1. The sum of two numbers, 454. The addition of four numbers | The most suitable `dictionary key-value` | leecode brush the notes
微信自动发卡机器人说明
Programming Experts in C Chapter 8 Why Programmers Can't Tell the Difference Between Halloween and Christmas 8.8 Software is more difficult than hardware
深度之眼(二十一)——概率论
MethodInterceptor
C专家编程 第7章 对内存的思考 7.8 轻松一下---“Thing King”和“页面游戏”
LeetCode 热题 HOT 100(8.三数之和)
使用同花顺软件炒股安全吗?
【PTA】L2-002 Deduplication of linked list (25 points)
C Expert Programming Chapter 7 Thinking About Memory 7.8 Take it easy --- "Thing King" and "Page Game"
Is it safe to use Tongdaxin software to buy stocks?
Research on the relationship between Yun and Enmo on "HTAP" and "Intelligent Warehouse Lake"
go优先级队列实现
dotnet 控制台 Hangfire 后台定时任务
视觉SLAM十四讲(高翔版本),ch1-2章节部分笔记
LeetCode hot topic HOT 100 (4. Find the median of two positive-order arrays)
dotnet 如何调试某个文件是哪个代码创建
我,一个软件测试工程师,谈谈我每天的日常工作...
(路透社数据集)新闻分类:多分类问题实战
基于TCP的聊天系统