public marks

PUBLIC MARKS from decembre with tags javascript & script

2018

CSP - BOOKMARKLET - The Resurrection of Bookmarklets

I use the @resource command to access my 56K JavaScript library file, get the contents of it, and directly insert that .JS file document text using the script object .text property instead of the .src property.

2017

GREASYFORK - LIBRARY - checkForBadJavascripts

checkForBadJavascripts: This is a utility function, meant to be used inside a Greasemonkey script that has the "@run-at document-start" directive set. It Checks for and deletes or replaces specific "scrip" tags.

JSON - What is JSON? An Introduction and Guide for Beginners

in this JSON tutorial and guide, I’m attempting to provide a fairly comprehensive discussion of JSON, its history, and its usefulness. I’ll close with a list of some practical JSON tools that might come in handy in future projects. JSON Defined JSON stands for JavaScript Object Notation and it’s a data format. That is, it’s a way to hold bits of information, similar to a database. Although JSON originated outside the ECMAScript specification, it is now closely related to JavaScript with the spec now including a JSON object and many developers incorporating it as a quasi-subset of the language.

2015

jQuery - Does jQuery .remove() clear out loaded javascript when it is used to remove a script tag? - Stack Overflow

No. Once a script is loaded, the objects and functions it defines are kept in memory. Removing a script element does not remove the objects it defines. This is in contrast to CSS files, where removing the element does remove the styles it defines. That's because the new styles can easily be reflowed. Can you imagine how hard it would be to work out what a script tag created and how to remove it? EDIT: However, if you have a file that defines myFunction, then you add another script that redefines myFunction to something else, the new value will be kept. You can remove the old script tag if you want to keep the DOM clean, but that's all removing it does. EDIT2: The only real way to "clean up" functions that I can think of is to have a JS file that basically calls delete window.myFunction for every possible object and function your other script files may define. For obvious reasons, this is a really bad idea.

SCRIPT - Floating Layer At Cursor Position

This post shows how to implement layers that will display content over existing content just below and to the right of the cursor position

GM - greasemonkey - Changing Javascript on an HTML page out of my control - Stack Overflow

use Greasemonkey to modify the script or to insert another script just after it to override the function

GM - firefox - How to alter this javascript with Greasemonkey? - Stack Overflow

On Firefox Greasemonkey, you can do that with the stupefyingly brilliant (^_^) checkForBadJavascripts utility

2014

JAVASCRIPT - Jscript - Named function expressions demystified

(via)
In a nutshell, named function expressions are useful for one thing only — descriptive function names in debuggers and profilers. Well, there is also a possibility of using function names for recursion, but you will soon see that this is often impractical nowadays. If you don’t care about debugging experience, you have nothing to worry about. Otherwise, read on to see some of the cross-browser glitches you would have to deal with and tips on how work around them.

javascript - Use Greasemonkey to replace links, to images, with images? - Stack Overflow

Replacing links to images is not too hard to do. However, I recommend that you keep the link but display the picture inside it. This is so you can click through if something goes wrong. For example, that sample page you gave has most of the linked images on a dead site. Other linked images only look like they point to images or might be blocked for "hot linking". To make the code robust and easy, we use jQuery and waitForKeyElements. Here is a complete working script that delinks the payload image-links on that sample site:

2010

unsafeWindow - Injecting JS functions into the page from a Greasemonkey script on Chrome - Stack Overflow

I have a Greasemonkey script that works just fine in Firefox and Opera. I struggle with getting it to work in Chrome, however. The problem is injecting a function into the page that can be invoked by code from the page. Here's what I'm doing so far: First, I get a helper reference to the unsafeWindow for Firefox. This allows me to have the same code for FF and Opera (and Chrome, I thought).

Folders4Gmail - Greasemonkey for Gmail - Organize labels into subfolder like hierarchy.

You can organize labels into subfolder like hierarchy. Create a parent label like Home and then create sublabels like Home\Bills, Home\Receipts, etc. I thought I never needed folders but this makes using labels so easy to use with the new colors!

User Script Compiler - Easily convert Greasemonkey scripts into Firefox extensions

First, you'll need to track down your installed scripts. They're in your Firefox profile, under the "gm_scripts" sub-folder. Or, if you'd prefer, you can skip the search and download any script from the online script repository. Next, you need to change the file extension from .js (Javascript) to .txt (plain text). After you've changed the extension, double-click the file to view the code. Copy and paste the code into the User Script Compiler and hit "Generate." Voila! Your new Firefox extension (.xpi) is complete. To install in Firefox, simply drag the new extension onto the Firefox interface and follow the prompts.

2009

Advanced Greasemonkeying — Yoan Blanc’s weblog

Jouant occasionnellement avec Greasemonkey, j’ai fait face a des problèmes récurrent liés à l’architecture de l’extention elle-même. * Comment réutiliser une bibliothèque déjà présente dans la page, * comment traiter un résultat XML * ou qu’est-ce qui fait que je n’arrive pas à mettre une Yahoo!/Google maps dynamiquement. Réutiliser une librairie(, fonction, variable) existante

Pieds de poulet... Ou ChickenFoot en anglais est une extension pour Firefox qui permet d'ajouter un environnement de programmation Javascript à Firefox. - KORBEN

C'est réservé aux bidouilleurs mais en gros le principe c'est d'utiliser javascript sur les sites que vous visitez afin de réaliser des choses sympathique comme automatiser certaines parties d'un site ou changer le comportement d'un script...etc C'est un peu comme GreaseMonkey mais en plus simple (pour peu que vous connaissiez Javascript) Mais là ou ça devient interressante, c'est que coupler à Firebug, qui est une extension Firefox pour débugger le javascript des sites web (avec point d'arrêt and co), il devient relativement simple de faire faire au site ce que vous voulez.

UserScript Writing 101 – Manuel of Things to learn - Userscripts.org

The Order of Things to Learn Look to the "Resources" section for places to learn about these. 1. HTML. Hypertext Markup Language. Not the same "language" as JavaScript. This is a markup language, meaning it's a bunch of text that is meant to represent some type of structure, in this case, a web page. 2. XML. Extensible Markup Language. In case you didn't realize, HTML itself is a type of "XML". Learning XML is important because many popular websites (YouTube, Facebook, Last.fm) use XML to interact with data. Since you already know HTML by this point, understanding XML should be cake. 3. CSS. Cascading Style Sheets. This is the way HTML (should be) stylized. You'll want to learn this. 4. JavaScript. Learn all the basics: data types, functions, JavaScript's native functions like prompt, alert, etc. 5. The Greasemonkey Extras. Like I said, Greasmonkey == JavaScript, with a lot of extras. A specific page listing the API's can be found here.

DOM events - Wikipedia, the free encyclopedia

by 1 other
DOM (Document Object Model) events allow event-driven programming languages like JavaScript, JScript, ECMAScript, VBScript and Java to register various event handlers/listeners on the element nodes inside a DOM tree, e.g. HTML, XHTML, XUL and SVG documents. Historically, like DOM, the event models used by various web browsers had some significant differences. This caused compatibility problems. To combat this, the event model was standardized by the W3C in DOM Level 2.

JavaScript Deobfuscator - Show you what JavaScript gets to run on a web page,

This add-on will show you what JavaScript gets to run on a web page, even if it is obfuscated and generated on the fly. Simply open JavaScript Deobfuscator from the Tools menu and watch the scripts being compiled/executed.

Phoenix :: Add-ons for Firefox

An editor with real time syntax highlighting which allows edit, run and test CSS, HTML and JavaScript code. Phoenix will tell you how many CSS and JS files are loaded into a page, how big these are,...

L'éditeur JavaScript - AJAX

by 17 others
L'éditeur JavaScript édite ses scripts suivant les paramètres que vous lui donnez ! Simple et rapide !

decembre's TAGS related to tag javascript

ajax +   animation +   api +   article +   best +   bibliotheque +   blog +   bookmarklet +   browser +   carte +   checkbox +   code +   comment +   conversion +   convert +   css +   declaration +   demo +   design +   dev +   development +   documentation +   dom +   editeur +   editor +   example +   exemple +   extension +   fichier +   firebug +   firefox +   flash +   flickr +   FlickrSurf+ +   forum +   free +   function +   google +   greasemonkey +   guide +   hack +   howto +   htlm +   html +   iframe +   image +   interface +   java +   jQuery +   json +   lab +   library +   link +   liste +   maps +   ocr +   online +   online-tool +   opensource +   outil +   php +   player +   plugin +   programmation +   rechercher +   reference +   regex +   regexp +   Responsive +   ressource +   script +   scroll +   scrollbar +   selection +   site +   spip +   stackoverflow +   svg +   tag +   test +   text +   tips +   tool +   transform +   tuto +   tutorial +   tutoriel +   update +   user +   userscript +   utilitaire +   video +   web +   web2.0 +   webdesign +   webdev +   xhtml +   xml +   xpi +   xul +