I’m actually uploading many hundred of classical booklet pages. It is annoying to set every single picture to the type “booklet”.
Do you know any script who could set the type for all pictures on the ready-to-upload-page before I submit it? (Changing back the few front/back covers would be easy).
And in addition:
Do you know a possibility to number such pages automatically, maybe with a starting number and increasing value? The result should be “booklet 1-2”, “booklet 3-4” for doublepages or “booklet 5”, “booklet 6”, “booklet 7” for single pages.
That would be nice. Guessing from the filename of the uploaded file could also be viable, but there are probably too many possible naming schemes to consider.
Notice that a more realistic example would be “booklet 2–3”, “booklet 4–5” and so on.
As odd pages are right and even pages left. By convention, page 1 is the cover.
Signed, mister I know everything better than everyone.
[quote=“jesus2099, post:5, topic:69868”]Signed, mister I know everything better than everyone.[/quote]As long as we will see another fine NG-SELECT-ALL-TYPES-AUTOMAGICALLY-AND-GUESS-FILENAMES-FANCY-JESUS-SCRIPT you are right
Doublecheck if you really see the prefix «javascript:», my FireFox eat it everytime I paste it…
2.) Create a bookmark for this single line of code ***
3.) Use this bookmark on the MB /add-cover-art page with just freshly uploaded covers and it will mark every occurence of the “Booklet” type checkbox for every uploaded picture.
4.) You can easily change the type of checkbox to be activated by changing the number follwing "value="
The # 1 is the Front Cover, # 2 the Back Cover, # 3 the Booklet and so on up to 13 for Watermark.
Hint:
*** if you get a warning about «…preventing social engineering attacks…» you may have installed NoScript. It’s up to you to create the bookmark directly or deactivate NoScript for this step.
If you see your bookmark with the above line, you can re-activate NoScript and the line works fine.
Just to let you know:
It seems that at least in FireFox and Google Chrome the checkboxes for “booklet” are set correctly with the above script and they are visible as expected.
BUT: If you send such a page to the MB server, all the covers with such a automatically set checkbox results in a cover WITHOUT any type.
I don’t know why there should be a difference setting the checkmarks manually or with a script. @jesus2099: I still hope you can find some spare time and write another wonderful Greasemonkey script.
Because of how the MBS page are built using some JavaScript library (knockout, AngularJS, something like that), you have to despatch the change event after having set your value on the input.
Like in my scripts (for which I made a utility sendEvent function), you can do:
var event = document.createEvent("HTMLEvents");
event.initEvent("change", true, true);
el.dispatchEvent(event);
I have not tested your bookmarklet, but it may do the trick.
It is now possible to enter the number for the checkbox you want to activate.
No need to change the bookmarklet-code anymore: javascript: var val=prompt("# of Checkbox to activate or deactivate \n(Front=1, Back=2, Booklet=3...)",""); [].forEach.call(document.querySelectorAll('input[value="'+val+'"]'), function(el) {el.click();});