public marks

PUBLIC MARKS from decembre with tag script

This year

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.

BIB - greasemonkey - ILibX 2.0

(via)
General Questions/ Is LibX Free? How is LibX different from other library toolbars? Is there a version for my library? What version of Firefox does it work with? Does it work with Internet Explorer (IE)? Can I have two editions installed simultaneously? How can I get the Google Scholar search to work even if my institution has not registered with Google? How do I uninstall LibX?

2016

2015

Upload 360 degree videos - YouTube Help

(via)
YouTube supports uploading and playback of 360 degree spherical videos on desktop Chrome. In order to upload a 360 degree video file, you'll need to modify the file with an app or script before uploading. __Create a 360-enabled file with an app__ __Download the 360 Video Metadata app for Mac or Windows __Un-zip the file, then open the 360 Video Metadata app. If you're on a Mac, you may need to right-click the app and then click "Open" __Select the video file __Click "Inject and save" __Enter a name for the file that will be created __Save the file. A new file will be created automatically in the same location as the original file __Upload the new file to YouTube __Wait for the 360 degree effect to process. This may take up to an hour.

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.

UserScript: Quick link to Flickr Url and HTML code for images. | Femgeek.co.uk

(via)
This is a very basic user script that puts the url of the image you want in the image thumbnail as your browsing the site, it also adds a textarea to enable you to copy the html straight into your blog post without clicking through to the image

BOKMARKLET - jQuery UI dialog in Bookmarklet and GreaseMonkey - Stack Overflow

(via)
Thanks to some awesome answers in other threads, I learned how to: load jQuery and jQuery-UI in a bookmarklet load a CSS into a bookmarklet using jQuery create a DIV in a bookmarklet using jQuery create jQuery UI dialog (external link) and I could manage to combine all four things into a single script which works both as a BookMarklet and as a GreaseMonkey script, which is absolutely awesome.

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

USERSCRIPT - @document-start Example: hijack page scripts for Greasemonkey

The implement of @run-at document-start greatly extent what userscript capable range. This snippet is one of the example show how to interfere the original script before they run, instead of stay away until the DOM is ready ( DOMContentloaded event fired ).

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

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

WIN HOST - Dev version of popular blocker extension µBlock for Firefox released - gHacks Tech News

Maybe I'm overlooking something but I don't understand why people are using ad-blockers that run in their browsers ... In most operating systems there already exists an effective and resource-efficient way to filter network traffic by diverting specific IPs or URLs to the localhost. Using the hosts file, which exists in the BSDs, in Linux, in Windows etc., to filter out undesirable or dangerous stuff is in my opinion a much more universal and elegant method than browser based ad-blockers. I've been using this method since ages, first in Windows and now since almost 15 years in Linux, and I have never experienced any slow-downs or hang-ups. The hosts file I'm using is the 'classic' from ... http://winhelp2002.mvps.org/hosts.htm ... which currently contains over 15000 entries, is well maintained and updated each 4-6 weeks. I've written a short script which on boot-up looks if a new hosts file is available, and if it is, downloads and copies the file into the /etc directory. Cool! :-)

CUSTOM BUTTON - Userstyles - Help! Is it possible to enable/disable a single script via keyboard shortcuts? - forum.userstyles.org

Toogle Style Lite: https://dl.dropboxusercontent.com/u/77691265/ToggleStyleLite.htm Requires Custom Buttons extension: http://en.sourceforge.jp/frs/g_redir.php?m=jaist&f=/custombuttons/custombuttons-0.0.5.9pre1-20140622.xpi Middle-click button for settings dialog to enter the ID# of the style to be toggled and other various options, including setting-up a keyboard shortcut (hotkey). Left-click button to toggle on/off style. Style Toggler: https://dl.dropboxusercontent.com/u/77691265/StyleToggler.htm Generates a list of all/selected styles with various options.

2014

GM - MPIV (Mouseuver Popup Image Viewer) : Host Rules How-To

You can make MPIV work with more sites by adding your own host rules. You don't need to edit the source code for this. Instead, you paste the rule into MPIV's settings dialog which is accessible from your script manager's toolbar icon menu, e g. "User Script Commands" → "Set up Mouseover Popup Image Viewer" for Greasemonkey users.

PIN - Pinterest - WordPress › jQuery Pin It Button For Images « WordPress Plugins

(via)
If you're looking for an easy way to pin images in your blog posts and pages, this plugin will help you with that. It highlights images and adds a "Pin it" button over them once the user hovers his mouse over an image. Once the user clicks the "Pin it" button, the plugin shows a pop-up window with the image and a description. Everything is ready for pinning, although the user can alter the description

Custom Buttons • Format HTML

Highlight text in page textarea and click on format desired. Focus needs to be in page textarea for Dialog to display. Style1 - Style10 buttons are preset with the displayed style Customize the 10 preset styles at the beginning of the script (do not alter characters after !important;) Texarea for user defined csss (retains last entry) Optional short name for url's (retains last entry) Quote name clears after each insert Colorpicker or manually insert color value for fonts

GM COOKIE - Cookie Injection Using Greasemonkey | Views From The Hill

(via)
To use with Wireshark. The CookieInjector userscript simplifies this process, by allowing the user to copy-paste the cookie portion of the dump and have the cookies from the dump automatically created on the currently viewed web page. Updated Cookie Injector Script available on Userscripts.org

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.