Tampermonkey oil monkey plug-in - installation and usage tutorial

Anyone who is familiar with browsers knows, especially the famous Chrome browser, that rich extensions allow many people to experience the magic of the browser, and a browser without extensions is incomplete.

Plug-in introduction

Among the many extensions, we have to mention a browser plug-in - Tampermonkey . Commonly known as oil monkey in Chinese.

I believe many people have heard of it, and you can understand it as a user script manager. It cannot play any role for us by itself. It mainly relies on the extension scripts (JavaScript code) written by major communities to run on the browser to change the functions of the visited web pages and improve our web browsing experience.

plugin installation

Let's install

Demo browser: Microsoft Edge (recommended)

method one

①Direct Baidu manual search to enter Tampermonkey official website .

Tampermonkey Stable is the official version, Tampermonkey Beta is the beta version

Click Download , and the page will jump to the installation page of the Edge extension store, we can just get it and install it directly, as shown in the figure below.

For other browsers other than Edge, clicking download will jump to the chrome online application store . Normally, we cannot open it, and we need to surf the Internet scientifically to open it.

②Alternatively, many browsers also have corresponding extension markets intimately, and we can also directly install them directly in places such as their extension application markets.

360 browser application market

Method Two

Considering the popularization of civilized Internet access, other browsers other than Edge, we can also obtain the crx file of Tampermonkey from many channels , unzip the downloaded compressed package, and the type of CRX file is the installation that needs to be used next document.

打开浏览器设置,打开扩展程序页面,或者直接搜索Chrome://extensions/进入。然后保持页面开发者模式的开启。找到被解压后的tampermonkey.crx文件,将其拖动到扩展程序页面,释放并同意完成安装。

成功安装后会弹出这个窗口,页面右上角也会出现油猴扩展的logo。

不同浏览器所支持的扩展及安装过程可能略有出入,这里呢就主要以我的情况来介绍,不过理论上支持chrome内核的其他浏览器都是可以安装的。

脚本获取

之前我们说过,油猴插件是以运行用户脚本来实现功能的,这里我们点击窗口右上角的油猴插件logo 。

添加新脚本。这个主要是给有一定基础能力的人使用,当然也可以把我们信任的第三方脚本复制进来,然后进入文件再点击保存来使用,这里我们不作深究。

获取新脚本。进入由油猴插件为我们提供的脚本市场,这里面大都是其他用户为了满足自己的需要而写并分享出来的,我们就可以使用这些现成的脚本。

这里我推荐GreasyFork,页面布局简单明了,容易上手。

脚本安装与使用

这里我们挑选或搜索一个脚本:AC-baidu-重定向优化百度搜狗谷歌必应搜索_favicon_双列

进入页面,我们会看到该脚本的相关基本信息,大致了解了该脚本的具体功能与用户们的使用评价,酌情选择安装该脚本。

安装完毕后,再次点击右上角油猴logo,进入管理面板,即可查看我们安装的脚本,在这里我们也可以对脚本进行禁用导出删除等其他管理操作。

根据前面脚本信息页面功能的具体描述,我们来验证脚本的作用,我们这次回到主页, 然后“任意”搜索一部动漫。

脚本使用前

脚本使用后

经过页面右上角简单的自定义设置后,页面内无用的垃圾信息明显减少了,内容排列更工整,反人类排版布局消失了,至少我不用一直歪着头看屏幕。

每一个用户脚本一般都是在其特定的域名内发挥作用的。至于其他好用的脚本,这里就不给大家一一展示了,码字好累。

脚本的保存

如果安装了很多的脚本,我们如何更好的保存下来呢?比如说我们需要更换电脑,或者需要重装浏览器,重新再一个一个去安装?时间是宝贵的!

这里油猴为我们提供了几种方法。我们再次回到管理面板,选择实用工具。

①云:选择导出备份到云盘(国内支持OneDrive)

之后可在显示备份中备份记录里查看并选择导入进行安装

②压缩包文件:任意选择一个导出,分别会被下载保存为一个.zip压缩格式文件和一个.txt文本格式文件,我们用来备份保存。

以后安装就只需在对应选项中点击选择文件,找到被转移保存的相关对应文件选择并打开安装即可

然后的话,其他的细节就不再多言了,码字真的好累。

使用须知

那么,安装的这些脚本靠谱吗?

恶意脚本是可以侵犯我们的隐私,并能够代表我们来进行其他操作。Tampermonkey本身是有着严格的权限设置的,只要你是在其官方渠道下载的脚本,我们应当在尽可能安全的渠道安装脚本。

可以检查脚本源码,查看代码中是否包含敏感操作,你要是能看懂的话。或者去反馈评论里,查看其他用户评论如何,脚本是否违规被检测,是否已失效,有利也有弊。

提示:无论我们是否安装该插件,也无论在任何情况下,我们在日常生活中也要时刻注意个人信息的保护。

最后,希望大家正确规范使用工具解决问题,合理使用,对他人负责,对自己负责。

おすすめ

転載: blog.csdn.net/s514266219/article/details/129460541
おすすめ