FAQ Database Discussion Community


Chrome extension set to `run_at` `document_start` is running too fast?

javascript,google-chrome,google-chrome-extension,userscripts,content-script
EDIT: Something was wrong with my Chrome browser and creating a conflict with my script, a full reinstall eliminated whatever the problem source was. If I happen to find out what was causing it I will include it in here. I have been learning how to create a simple Chrome...

running my code when other function called Javascript

javascript,ajax,userscripts
I am writing a user script (for greasemonkey) to a website. This website uses Ajax to change the HTML without reloading, and i want to add some buttons every time the page changes. The function that does it called "ajaxHandlerCall". Is there a way to load my function every time...

How to replace a

jquery,userscripts,replacewith
<div class="pagination"> <button class="ajax left" data-href="" rel="prev"></button> <button class="active">1</button><button class="ajax" data-href="/legenda/carrega_destaques/todos/2">2</button> <button class="ajax" data-href="/legenda/carrega_destaques/todos/3">3</button> <button class="ajax" data-href="/legenda/carrega_destaques/todos/4">4</button> <button class="ajax" data-href="/legenda/carrega_destaques/todos/5">5</button>...

Dynamically change YouTube player size with JavaScript?

javascript,google-chrome,dynamic,youtube,userscripts
I want YouTube to fill my browser window completely, without removing the comments/playlists/whatever. I made the following script that works perfectly (ignoring some details I'll fix later) whenever I resize the window. It doesn't (fully) work when the page gets loaded or when I use the maximize button. How can...

Github redirect from sign-out to sign-in page instead of homepage

javascript,jquery,github,greasemonkey,userscripts
I would to redirect to sign-in page when sign-out instead of redirect to homepage in github. Any idea how I can do with an userscript? I would be grateful for assistance. Here is how the form snippet look: <ul> <li class="header-nav-item"> <form accept-charset="UTF-8" action="/logout" class="logout-form" method="post"> <div style="margin:0;padding:0;display:inline"> <input name="utf8"...

Conversion of JavaScript to userscript

javascript,jquery,jquery-ui,greasemonkey,userscripts
I have a JavaScript running making ajax calls to a server. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script type="text/javascript"> var div = '<div id="OverlayDialog">'; $.Coral = function (options) { $.extend(options, { data: JSON.stringify(options.data), dataType: 'json', type: 'POST', async: false, contentType: 'application/json', processData: false, headers: { 'Content-Encoding': 'abc', 'Target': options.operation }, dataFilter: function(data,...

How to 'return' outside function definition in typescript

javascript,typescript,userscripts,tampermonkey
I need to rewrite my tampermonkey script on typescript. What is correct way to rewrite this javascript on typescript? if (window.top != window.self ) { return; } Main goal is to stop executing script if it's running not in window.top. Typescript compiler write ERROR TS1108: A 'return' statement can...

Will Microsoft Edge support userscripts?

javascript,browser,userscripts,microsoft-edge
Did Microsoft announce whether Edge will support userscripts? Doesn't matter if via plugins (similar to Greasemonkey in Firefox or Tampermonkey in Chrome) or as an out-of-the-box feature.

Javascript detect elements in front of elements

javascript,overlay,userscripts
How can one know if an element is in front of another element, if the overlaying element is transparent? The purpose for this is if you're artificially clicking a page element by its ID, and you're ensuring there's no overlay on top of the element that would make confirm the...

Userscript that applies to all pages causes issues in StackExchange [duplicate]

javascript,userscripts
This question already has an answer here: jQuery in Greasemonkey 1.0 conflicts with websites using jQuery 3 answers Possibly related: Google comes up blank. My userscript here seems to cause issues when I use it in Firefox. Google searches come up blank, though I can inspect and see the...

Greasemonkey: Unable to move div classes

javascript,html,greasemonkey,userscripts,twitch
I've been trying to use a personal grease/tampermonkey script for use on twitch.tv Currently I'm trying to move stats and stream-config-status to be above the dash-hostmode-contain. I found this post and tried re-working it to fit what I want. This is what I had setup http://jsfiddle.net/7L2s180s/3/ But I am pretty...