Question

We are trying to upgrade our MooTools installation from 1.2.4 to 1.2.6. The original developer included a "more" file with optional plugins, but because it is compressed we can't tell what was included in that file. I'd rather not hunt and pick through the code.

I noticed the compressed more file has a build hash in the header (6f6057dc645fdb7547689183b2311063bd653ddf). The 1.4 builder located here will let you just append that hash to the url and create a build. It doesn't seem the 1.2 version supports that functionality.

Is there an easy way to determine from the hash or the compressed file what plugins are included in this 1.2 build?

Was it helpful?

Solution

AFAIK there's no way to get the list of plugins directly from the build hash. But if you have access to a UNIX shell, save the following shell script as find_plugins.sh:

#!/bin/sh

for PLUGIN in \
    More Lang Log Class.Refactor Class.Binds Class.Occlude Chain.Wait \
    Array.Extras Date Date.Extras Hash.Extras String.Extras \
    String.QueryString URI URI.Relative Element.Forms Elements.From \
    Element.Delegation Element.Measure Element.Pin Element.Position \
    Element.Shortcuts Form.Request Form.Request.Append Form.Validator \
    Form.Validator.Inline Form.Validator.Extras OverText Fx.Elements \
    Fx.Accordion Fx.Move Fx.Reveal Fx.Scroll Fx.Slide Fx.SmoothScroll \
    Fx.Sort Drag Drag.Move Slider Sortables Request.JSONP Request.Queue \
    Request.Periodical Assets Color Group Hash.Cookie IframeShim HtmlTable \
    HtmlTable.Zebra HtmlTable.Sort HtmlTable.Select Keyboard Keyboard.Extras \
    Mask Scroller Tips Spinner Date.English.US Form.Validator.English \
    Date.Catalan Date.Czech Date.Danish Date.Dutch Date.English.GB \
    Date.Estonian Date.German Date.German.CH Date.French Date.Italian \
    Date.Norwegian Date.Polish Date.Portuguese.BR Date.Russian Date.Spanish \
    Date.Swedish Date.Ukrainian Form.Validator.Arabic Form.Validator.Catalan \
    Form.Validator.Czech Form.Validator.Chinese Form.Validator.Dutch \
    Form.Validator.Estonian Form.Validator.German Form.Validator.German.CH \
    Form.Validator.French Form.Validator.Italian Form.Validator.Norwegian \
    Form.Validator.Polish Form.Validator.Portuguese \
    Form.Validator.Portuguese.BR Form.Validator.Russian \
    Form.Validator.Spanish Form.Validator.Swedish Form.Validator.Ukrainian
do
    grep -q -F $PLUGIN $1 && echo $PLUGIN
done

Then run it like this passing the filename of your MooTools More file as first argument:

sh find_plugins.sh mootools-more.js

It will print out a list of all plugin names found in the JS code. That should get you started.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top