public marks

PUBLIC MARKS from decembre with tag script

This year

GREASEMONKEY (v.4 - webextention) - FIR 57 - Greasespot: Greasemonkey 4 For Script Authors

What? The Greasespot Wiki will be updated to explain Greasemonkey 4 in detail. Until then, here's a quick summary. First, there is only an embedded editor. Browser Extensions have no access to the file system, so you can no longer author user scripts in your familiar text editor. There is only one object provided to user scripts now, named GM. It has several properties. One of them is info – the equivalent of the old GM_info. There are also several methods of this object: getResourceUrl, deleteValue/getValue/listValues/setValue, xmlHttpRequest. To use these methods you still need @grant, and use the new name, e.g.: // @grant GM.setValue The new form has a dot, where the old form has an underscore. You may specify both @grants, if you'd like to be compatible with Greasemonkey 4 and other user script engines at the same time. As of today, there is no support for: GM_log (use console.log), GM_addStyle, GM_registerMenuCommand, nor GM_getResourceText.

fir 6 jquery 6 Getting Started | Select2 - The jQuery replacement for select boxes

The jQuery replacement for select boxes Forums GitHub IRC Chat Select2 gives you a customizable select box with support for searching, tagging, remote data sets, infinite scrolling, and many other highly used options.

USERSTYLES - DeviantArt Forum - 2014 - Installing UserStyles directly from dA – DeviantArt

(via)
Instead of having to get an userstyles.org account, it would be much easier to be able to install user styles directly from dA. The process for the upload could be similar to what we have with installable skins right now (based on .txt files with mandatory wrapping code). Imo it's also more logical if dA styles would stay on dA. No need to rely on outside sources. If implemented there needs to be an way to be able to update styles though, to work on bug fixes or do updates from time to time. Similar to the installable skins, you then would have an install button at the deviation page of those styles directly. This would be less scary for people who are warned that there are monsters outside dA and - which would be another big plus (i am totally not biased here lol) - it would make miscats to that gallery nearly impossible.

USERSCRIPT - NEW Version for Firefox 57 will break scripts - Greasemonkey 4 For Users

Greasemonkey 4 is changing how it runs user scripts. Many user scripts will continue to run as expected, but this will break some scripts. If you rely on such scripts, you might want to install Violentmonkey or Tampermonkey, both of which provide compatibility for existing scripts. If you'd prefer to stick with Greasemonkey, you'll need to wait for the script to be updated to be compatible. Find the original author of your script, and ask them to update for Greasemonkey 4 compatibility. Referencing this post may help.

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.