greasemonkey

Greasemonkey against an iframe using @include - does this work? [duplicate]

吃可爱长大的小学妹 提交于 2019-12-03 06:30:07
This question already has answers here : Apply a Greasemonkey/Tampermonkey/userscript to an iframe? (3 answers) I'm wondering if you can have Greasemonkey execute against an iframe only and not it's parent window. The parent window is domain A, the iframe is domain B, and the include in the script would be @include http://domain-B.com/path/ *. I don't need any interaction with the parent. I've tried this a couple of times without success. Is there any cross-domain restriction preventing someone to execute against the iframe? PS: The iframe has JS code that prevents it from loading as the top

How do I get the jQuery-UI version?

狂风中的少年 提交于 2019-12-03 06:27:53
问题 This should be an easy question, but how do I detect the jQuery-UI version? This is for a Greasemonkey script and the (current) target page appears to be running jQuery-UI, 1.5.2. But, different target pages may run different versions. console.log ($.ui); did not show anything useful/obvious for version detection. 回答1: You can use $.ui.version, it's actually the property jQuery UI looks for when determining if it should load itself (if it's already there, abort). For example here's a fiddle

Update a greasemonkey script in chrome without reinstalling?

佐手、 提交于 2019-12-03 06:10:04
问题 I just want to be able to save, refresh the page, and have my changes show up like I do in Firefox. Having to drag it over and install it every time gets annoying. Any ideas? 回答1: Yes, there is a way to do this. Using the method adopted from this brilliant answer (^_^), you can edit scripts -- in place -- and just hit a "Reload" link for the changes to take effect. This method has the added bonus that Chrome's Extensions folder 1 doesn't get cluttered with indecipherable folder and file names

Follow all users on a twitter page [closed]

微笑、不失礼 提交于 2019-12-03 03:56:44
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I'm on https://twitter.com/#!/username/followers ; is there any greasemonkey script to follow all the twitter users on that page? 回答1: Here's a new one which also employs a delay to prevent spam issues. var FOLLOW_PAUSE = 1250; var FOLLOW_RAND = 250; var PAGE_WAIT = 2000; __cnt__ = 0; var f; f = function() { var

Using javascript for pinging a webapp to keep session open

浪子不回头ぞ 提交于 2019-12-03 03:52:59
问题 I'm writing a greasemonkey script to keep session open on a webapp I use for work. Which javascript command would you use to create some feedback with the server and ensure the session doesn't fall without having to bother the user making a complete refresh of the page? 回答1: I've solved the issue using: function keepAlive() { var httpRequest = new XMLHttpRequest(); httpRequest.open('GET', "/restricted_file_url"); httpRequest.send(null); } setInterval(keepAlive, 840000); //My session expires

How to use angularjs with greasemonkey to modify web pages?

﹥>﹥吖頭↗ 提交于 2019-12-03 03:31:48
I want to modify web pages' behavior using angularjs and greasemonkey. I want to know, what's the best way to do it? Should I use jquery to inject attributes like "ng- * " to DOM elements before I can write some angular code? Or can I solely stick to angularjs? Thanks. There's a general answer about dynamically modifying AngularJS content in the DOM from JavaScript code here: AngularJS + JQuery : How to get dynamic content working in angularjs To sum up, when you put ng-* attributes into the DOM from JavaScript code, they won't automatically get hooked up; but AngularJS provides the $compile

How safe is Greasemonkey?

隐身守侯 提交于 2019-12-03 02:56:31
I've never actually used greasemonkey, but I was considering using it. Considering that GreaseMonkey allows you to let random people on the Internet change the behavior of your favorite websites, how safe can it be? Can they steal my passwords? Look at my private data? Do things I didn't want to do? How safe is Greasemonkey? Thanks Considering that GreaseMonkey allows you to let random people on the Internet change the behavior of your favorite websites, how safe can it be? It's as safe as you allow it to be - but you aren't very clear, so let's look at it from a few perspectives: Web

How do I get the jQuery-UI version?

感情迁移 提交于 2019-12-03 00:53:38
This should be an easy question, but how do I detect the jQuery-UI version? This is for a Greasemonkey script and the (current) target page appears to be running jQuery-UI, 1.5.2. But, different target pages may run different versions. console.log ($.ui); did not show anything useful/obvious for version detection. Nick Craver You can use $.ui.version , it's actually the property jQuery UI looks for when determining if it should load itself (if it's already there, abort). For example here's a fiddle including version 1.8.4 . Unfortunately, $.ui.version was added in jQuery-UI version 1.6. For

Writing a userscript that replaces a background image

社会主义新天地 提交于 2019-12-02 19:51:17
问题 This is the code // ==UserScript== // @name Wood Background // @namespace http://www.nationstates.net/nation=ellorn // @description Changes background to wood finish // @include http:*//w11.zetaboards.com/Allied_Republics/* // ==/UserScript== function addCss(cssString) { var head = document.getElementsByTagName('head')[0]; return unless head; var newCss = document.createElement('style'); newCss.type = "text/css"; newCss.innerHTML = cssString; head.appendChild(newCss); } addCss ( '* {

Using javascript for pinging a webapp to keep session open

被刻印的时光 ゝ 提交于 2019-12-02 18:11:26
I'm writing a greasemonkey script to keep session open on a webapp I use for work. Which javascript command would you use to create some feedback with the server and ensure the session doesn't fall without having to bother the user making a complete refresh of the page? I've solved the issue using: function keepAlive() { var httpRequest = new XMLHttpRequest(); httpRequest.open('GET', "/restricted_file_url"); httpRequest.send(null); } setInterval(keepAlive, 840000); //My session expires at 15 minutes dreftymac Second choice If you absolutely insist on using Greasemonkey, any element.click()