tampermonkey

How to run a selector on a dynamically generated page?

本小妞迷上赌 提交于 2019-12-04 06:12:00
问题 I have a selector which works in GM_addStyle but not in jQuery. I want to use jQuery :contains() which is not available in CSS3. But, it appears that the id does not exist on my page when I view source but it's dynamically generated. How do I tell Tampermonkey to run JS after the whole page loads? I have tried different JS @run-at settings but no luck. //works GM_addStyle(" \ #T301444200 > tbody > tr.SelPrimary > td:nth-child(1) > nobr > span{ color: red; } \ "); //does not work $("

How do I set the value of a Text Field through TamperMonkey?

纵然是瞬间 提交于 2019-12-04 05:14:53
问题 I'm new to javascript and tampermonkey, try to remember that in your explanations please. This is the site I'm trying to work with As you can see it's pretty simple. However there's no way to make the site remember your password, and right now all I'm trying to do is make a script that will fill in the username and password fields with, you guessed it, my username and password. Working off of a few tutorials I found online (it doesnt seem like there's a lot of tutorials for writing scripts in

Tampermonkey - Right click menu

一世执手 提交于 2019-12-04 03:19:58
With Tampermonkey is there any way to create a right click menu option in Chrome? I found GM_registerMenuCommand but it does not seem to show any new items in the right click menu. Another problem is I use GM_openInTab in the test script but it seems to loop infinitely for some reason. It should only trigger after the menu is clicked, why would this happen? Also I am wondering is there a way to do this in a more advanced way with custom right click icons etc? There was a GM script for Firefox that worked for menus but in Chrome nothing seems to show so it would be good to have a way to have

Use the Tampermonkey API from the Chrome console?

一个人想着一个人 提交于 2019-12-03 21:47:34
问题 Is there any way use Tampermonkey's API in Chrome's JavaScript console? I want to mess with functions like GM_xmlhttpRequest() and GM_listValues() . 回答1: Create the following script: // ==UserScript== // @name Exports some GM functions // @namespace Whatever // @match * // ==/UserScript== // WARNING: Any page can now use these methods! Be careful, // or change "@match *" to "@match https://example.com" and // visit https://example.com to test the API. unsafeWindow.GM_xmlhttpRequest = GM

How to update tampermonkey script to a local file programatically?

杀马特。学长 韩版系。学妹 提交于 2019-12-03 16:43:53
For security reasons, Tampermonkey scripts are not saved in accessible files, but in a plugin data. The only way to edit them live is to use Tampermonkey's integrated editor. However, I'd rather use IDE, with all it's features. I also want to use webpack to pack the script from multiple files. To do that, I need a way to programmatically change the script in Tampermonkey to a new version. So far, what I did was manually copy&paste the new script into Tampermonkey's editor and that's really exhausting. So how to programmatically change Tampermonkey's script sourcecode? I've answered this in

非常实用的Chrome插件之总结

有些话、适合烂在心里 提交于 2019-12-03 13:08:55
Chrome在全世界能够如此受欢迎,除了它的稳定性强,速度快这些优点外,还有就是它的插件是非常丰富强大的!最重要的是作为一个程序员,如果不使用Chrome的话你还谈什么是程序员! 有人说不装插件的Chrome就像飞机没有安装机翼,对此我表示一定程度的赞同!安装一些强大实用的插件可以让我们的工作学习的效率大大提高。 下面我结合自己所用的插件以及别人的推荐,给大家介绍一些强大实用的插件,希望可以让你们的Chrome超神,安装插件的时候请注意科学上网! 1、OneTab 节省高达95%的内存,并减轻标签页混乱现象。可以一键恢复你全部的标签,当你的标签页打开太多时,使用这款插件是很有用的,避免你看的眼花缭乱。 2、Adblock Plus Adblock Plus 已被超过 1 亿台设备使用,是世界上最受欢迎的广告拦截软件!让你远离广告的打扰,还你清新的上网空间!装上之后是真心感觉世界一下子就安静了!注意:据说有人做了一个样子长得差不多的插件,放了脚本用来挖币了,所以下载时候一定要注意啦! 3、Octotree 当你打开GitHub或者GitLab代码的时候,有了它就可以很轻松的查看项目代码的结构了!方便快速定位到某个要找的文件!但是国内的程序员还是有很多使用码云的,这里不用怕,大佬们也有发现这个问题的,在这个Octotree的基础上适应了国情使得码云也可以使用这种树形结构,详细请参考

Where does GM_setValue store data?

喜你入骨 提交于 2019-12-03 11:03:56
问题 Where does GM_setValue store the data to in chrome. I've tried to determine where the data is going but couldn't figure it out. I monitored with process monitor and saw that when I stored a value chrome was updating a chrome_iwoeoiifoi2h3iofhufsdfnvdf type of file and I opened that up with an sqlite browser but the data was not there. I've looked at all the recently modified files trying to find the data but could not find it. Latest chrome/TM. 回答1: In Tampermonkey, GM_setValue() data is

Using jQuery in Tampermonkey

半世苍凉 提交于 2019-12-03 10:35:28
I'm using Chrome 27.0.1453.116 m and have enabled "Experimental Javascript", however I'm unable to get jQuery to run on Tampermonkey. I have tried: // ==UserScript== // @name My Fancy New Userscript // @require http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js // ==/UserScript== var $ = unsafeWindow.jQuery; var jQuery = unsafeWindow.jQuery; However, I get an error on the line var $ = unsafeWindow.jQuery; highlighting unsafeWindow saying unsafeWindow was used before it was defined. How to fix this? EDIT: Since Greasemonkey 2.0 you do not (and cannot) use unsafeWindow.jQuery for

Where does GM_setValue store data?

不问归期 提交于 2019-12-03 00:32:45
Where does GM_setValue store the data to in chrome. I've tried to determine where the data is going but couldn't figure it out. I monitored with process monitor and saw that when I stored a value chrome was updating a chrome_iwoeoiifoi2h3iofhufsdfnvdf type of file and I opened that up with an sqlite browser but the data was not there. I've looked at all the recently modified files trying to find the data but could not find it. Latest chrome/TM. In Tampermonkey, GM_setValue() data is stored in a LevelDB database that can be found in the User Data Directory tree. Once in Chrome's "User Data

get access to table in the iframe

独自空忆成欢 提交于 2019-12-02 18:56:20
问题 i have a website , login: cyclefreight1@usa.com pas: 12345678, log in and go to the drivers section(left menu bar firs item > drivers) I want to make some additional function to this web with tampermonkey. All information about drivers consist in the table, and information about current driver is available when you click to "Go to the current log" button i try to add some new functions to the current drivers section all this stuff are in the iframe , so i try to do an event listener to the