userscripts

Is it possible to determine if Chrome is in incognito mode via a user-script?

I asked this question before but didn't make it clear that I meant in user script, not in JavaScript from a webpage.So I'll be more clear now. Is it possible to determine if Google Chrome is in incognito mode via a user-script (basically a script run as an extension in the browser, not a script being run on a webpage)? ...

Hype Machine Fluid Greasemonkey script broken help fixing it.

Hi, There is a greasemonkey script here that is suppose to work with a standalone fluid app. I just tried it out and it doesn't but I can't figure out what is wrong with it. Anybody wanna take a look at the code for me see if I am doing something wrong. Alot to ask but worth trying. Source: http://userscripts.org/scripts/review/62762 Sc...

Using special keys for keybidings in Javascript

I was wondering if it was possible to use special keys that the macbook pro has for music control and bind them in javascript? Example keys: PLay/pause,next, back. I am trying to do this to modify a greasemonkey script if that helps. Here is the current code HotKeys.bindings['/'] = HotKeys.activateSearch; HotKeys.bindings['p'] = HotK...

Stop an input field in a form from being submitted

I'm writing some javascript (a greasemonkey/userscript) that will insert some input fields into a form on a website. The thing is, I don't want those input fields to affect the form in any way, I don't want them to be submitted when the form is submitted, I only want my javascript to have access to their values. Is there some way I cou...

Pass a variable to new page

I am trying to pass a variable from one page, load another and enter that information. something Like this: When 127.0.0.1/test.html&ID=1234 location.href = "127.0.0.1/newpage.html" if (location.href == newpage.html){ var e = document.GetElementById("Loginbx"); e.Value = ID } I don't have access to modify 127.0.0.1/test.html...

How to reuse jQuery of target page in userscripts?

Instead of using @require (that is GM specific) or injecting a <script> element (e.g. for pre-0.8 GMs & other browsers), I'd like to use the jQuery object that the target page already loads and uses. Is that kind of situation feasible and how to get it working? I've tried just using the $ or jQuery but it won't work. I've also tried the...

Run Code After Function is Finished OR DIV Appears

I have written a Userscript for Facebook and it groups similar notifications together. Now, using just a static HTML page with old notifications I had, the script works 100%. Here's the problem: the DIV that holds notifications by default, has no notifications in it until the user clicks on the Notification button. Facebook has an inlin...

Removing an anonymous event listener

Is there anyway to remove an event listener added like this: element.addEventListener(event, function(){/* do work here */}, false); without replacing the element? ...

Greasemonkey Userscript: pasting in jQuery?

Hi, I'm developing a Greasemonkey script to be used only with Firefox, and I need some help. I'm planning to use jQuery, and possibly some other scripts later on. Since the @require for GM only downloads the script at the initial install, later updates to the code won't download updates to external scripts. Therefore, i was wondering: ...

using jQuery in Safari Extension

Hi, I am trying to make a simple Safari 5 Extension that just injects a custom javascript. Any ideas how can I make use of jQuery in this custom script, please? I only know it's possible, because it is mentioned on one of WWDC videos, but I don't know how to do it. Thanks ...

safari 5 extension - javascript problem - safari seems to cache the page and the DOM state

I've written a greasemonkey javascript that works fine in NinjaKit the new Safari userscript manager, but when I try and compile the same script using the Safari 5 extension builder I get some very weird behaviour. The script gives the user an options editing screen, when you click the save button, the script saves the users preferences...

Is there any reliable way of accessing specific elements of Gmail from inside a userscript?

I'd like to make a script that replaces either the Notes box in the contact page, or the sidebar of a conversation thread, with content pulled from my server, very similar to the way Rapportive (http://rapportive.com/) works. I'd even like to be able to grab the email address of the person being looked at or emailed with, the way they do...

Replacing page functions via userscript in Chrome?

I've created a Greasemonkey script which replaces a page function: (function() { var oldFunc = func; func = function() { oldFunc(); // other stuff }; )(); I had always intended this script to work in both Gresemonkey and Chrome and had read that Chrome doesn't support unsafeWindow, so have been injecting th...

Changing default parameters of Mogenerator

I'm trying to make Core Data objects inherit from my own custom class rather than NSManagedObject. I started using Mogenerator and noticed that it has a --base-class arugument which does exactly what I want. The problem is that by default it doesn't use this parameter, and so every time I save my data model file, it sets the inherited c...

Replacing a JavaScript function with a UserStyle

I'm working on modifying a UserStyle for Instapaper. Since the original UserStyle was written, Instapaper added to their header a number of JavaScript functions that control the width of the page and the typefaces used. Here they are: function loadDefaults() { _fontSize = 16; _fontFamily = "G"...

Is there a PHP script that will scan files on my server and tell me when/if one changes?

Hi, A few months ago I saw a PHP script built to detect malware injections in files. Basically the script watched for any files on the server to change or for their contents to change, and then emailed an admin if the contents changed. I haven't been able to locate a script that does this but I need one. Does anyone know of a program...

Trigger inline onchange javascript.

I'm writing a greasemonkey script that creates an auto-complete search type box which makes it easier to select from a large dropdown on a webpage. The dropdown has inline onchange code which I can't seem to get to trigger when I change the selection using javascript. Any ideas? ...

Accessing iframes from a Chrome content-script extension

Hi, I'm writing a Chrome extension that needs to alter a popular web app when loaded. Unfortunately, most of the UI of that web app is rendered inside an iframe, and although the address of that iframe matches my content_scripts match declaration, the user script only gets invoked for the top frame. Q: Is there a method of accessing HT...

Google Chrome UserScript - Working with other windows and tied-up hands

I've got a little problem with UserScripts in Google Chrome, to be precise with getting to the object window of an iframe. Very doable via the Google Chrome console, very impossible via the UserScript or so it seems so far. To be honest it seems as if it was on purpose, as if there was some reason why I'm not allowed to access other wind...