userscripts

How can I prevent a webpage from detecting I am running a script?

跟風遠走 提交于 2019-12-06 10:26:53
问题 After experimenting with scripts on facebook.com, I noticed that for a couple of minutes it didn't allow me to connect to facebook.com. This happened more than one time so I suspect that Facebook doesn't like to mess with their code using userscripts. The Stack Overflow question Can a website know if I am running a userscript? answers the multiple ways a website can detect scripts. Now I want to know how I can fool a website to not detect any scripts I may be running. Is there a way to know

Scriptish script needs the page refreshed to run?

非 Y 不嫁゛ 提交于 2019-12-06 07:18:04
问题 This script assists in a checkout process at an online store. All is working correctly, except the need to refresh the page to get the program to run initially. I wonder if it is a cache problem because it works on other products that have been previously viewed. I also tried tinkering with the @run-at to no avail. I'm using the Scriptish extension and it is a standalone .js file. // ==UserScript== // @id proper-id // @name proper-name // @version 1.0 // @namespace // @description // @include

Greasemonkey script to move an element into another element?

喜欢而已 提交于 2019-12-05 19:08:20
I want to move <div> elements. In this case, swap the first and last div.clearfix . So this: <fieldset> <div class="clearfix "> <label for="form-title">Title</label> <div class="input"></div> </div> <div class="clearfix "></div> <div class="clearfix "> <label>Verification</label> <div dir="ltr"> recaptcha </div> </div> </fieldset> Would become this: <fieldset> <div class="clearfix "> <label>Verification</label> <div dir="ltr"> recaptcha </div> </div> <div class="clearfix "></div> <div class="clearfix "> <label for="form-title">Title</label> <div class="input"></div> </div> </fieldset> I've

Is the Immediately-Invoked Function Expression (IIFE) pattern really necessary when writing userscripts?

依然范特西╮ 提交于 2019-12-05 18:36:23
My question is quite similar to What is the purpose of a self executing function in javascript? , however it concerns userscripts (specifically for GreaseMonkey) instead. I see that some userscripts are distributed with this pattern, and some are not. Example of script with the IIFE pattern: (source) // ==UserScript== // (...) // ==/UserScript== (function(){ // if <condition> document.location.href += '?sk=h_chr'; // ... })(); Example of script without it: (source) // ==UserScript== // (...) // ==/UserScript== window.location.href = "https://www.facebook.com/?sk=h_chr"; In addition, I also

Looking for Greasemonkey Scriptwriting basics/tutorial [closed]

倾然丶 夕夏残阳落幕 提交于 2019-12-05 18:22:20
问题 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 4 years ago . I have been searching the internet for days now trying to find out how to write my own script, one more complicated than the "Hello World" script. I understand for the most part how to find specific elements using firebug (I have Firefox). I understand the metadata and how to do all that. I do not however

How to completely disable all exit warning/confirm messages with userscript?

烂漫一生 提交于 2019-12-05 11:36:53
I am using chrome in an isolated environment to scan malicious websites to analyze their data to create blacklists. This process is completely automated by userscripts and browser extensions. The problem is that some sites are able to show an exit dialog on beforeunload or unload (I will refer to these as events ). I already override these events , but when the site override my override again, the whole process stops. I mean they can redefine the events with AJAX calls, obfuscated scripts, evals, etc. Is there any way to get rid of these messages, or protect my override? Maybe unsafeWindow

Make my userscript wait for other scripts to load

岁酱吖の 提交于 2019-12-05 05:02:33
[ Edit: I'm replacing the original, confusing question with a simplified example demonstrating the problem.] Background I'm trying to write a userscript which will run in Chrome. This script needs to call a JavaScript function AlertMe() that is outside of the userscript -- this function is part of the page and contains variables that are generated dynamically on the server-side, so it isn't possible to re-write this function in my userscript. Code Script on the page ( visit the page ): <script type="text/javascript"> function AlertMe() { alert("Function AlertMe was called!"); // then do stuff

Using SmtpJS in a userscript: Doesn't work, no error messages?

浪子不回头ぞ 提交于 2019-12-04 19:11:23
I'm trying to send an email through a userscript using smtpjs because it seems the easiest approach. However it seems more difficult than just sending it by javascript that is embedded in a HTML page. Using this userscript ( based on the smtpjs website ) I get no error in the console and no email is sent, is this a framework issue or am I missing something here? (if you suggest an easier way to send emails within a userscript don't hesitate to share) // ==UserScript== // @name New Userscript // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! //

How can I run a user script before any inline scripts run on a webpage?

女生的网名这么多〃 提交于 2019-12-04 18:40:03
问题 I want to make a greasemonkey type script for firefox that runs before the scripts on the page. Greasemonkey scripts run after scripts on the page, so that won't work. The reason I need this is because I want to edit one of the scripts on the page. Specifically, I want to delete a script that forces the page to load inside a frame since having the page inside a frame breaks F5 (Pressing F5 makes the page jump back to the front page instead of reloading the current page). Also, I don't want to

How can I prevent a webpage from detecting I am running a script?

♀尐吖头ヾ 提交于 2019-12-04 16:26:09
After experimenting with scripts on facebook.com, I noticed that for a couple of minutes it didn't allow me to connect to facebook.com. This happened more than one time so I suspect that Facebook doesn't like to mess with their code using userscripts. The Stack Overflow question Can a website know if I am running a userscript? answers the multiple ways a website can detect scripts. Now I want to know how I can fool a website to not detect any scripts I may be running. Is there a way to know what my userscript HTML changes trigger on the website? Brock Adams For Firefox and Chrome there is no