Script Summary: add mass queue editor, drag box to select, select all button, and select by tag, change gutter width appearance, mass draft editor, show only certain posts, mass caption, mass clickthrough link
FEBRURARY 10, 2014
MAJOR BUG FIXES
SHOULD BE WORKING AGAIN
add mass queue editor, drag box to select, select all button, and select by tag
This adds the following functions to Tumblr Mass Post Editor:
Adds your queue to the mass/mega post edit (Mass Queue Editor),
Mouse click to drag bounding box around multiple items,
Hold shift to draw more than one selection box,
Adds "select all" button at the top.
Adds a "select by tag" option
Select posts without tags.
Adds a button to change gutter width.
Adds button to pause loading.
Adds button to mass edit posts from your drafts page (Mass Draft Editor).
Adds a feature to show only certain post types or tags.
"not this" option for select by tag and show only. Leave certain tags or types out.
Adds "Lite Mode" to override Tumblr's resource intensive brick masonry with lightweight inline CSS grid.
Publish drafts to your queue from your drafts page.
Adds a feature to Mass Backdate;
Adds a button to make selected posts private.
Mass Publish from your drafts page and queue page
Save Queue posts to drafts
Save old posts as drafts so they can be re-published as new posts. To republish, go to your drafts page or use the Mass Drafts Editor. Notes are not maintained anymore! Sorry :(
"NEW" Mass change click-through links and captions of photo posts.
(backdating is default tumblr backdating, ie: only blog dates change, but dash date/position stays the same)
(NOTICE: about mass publishing/republishing. If you save a live post to draft and republish it, it's like a makeshift form of "pinning" because it returns to the top of the dashboard. Use MODERATELY! Also it refreshes your old notes, so old notes show up as new notes on your dash.)
(major bug fixes and common sense additions)
This is a huge update. Sorry for how long it took, I've been locked up without a computer for 6 months. So basically when I got back I discovered the MPE no longer uses the Prototype.js, but instead uses jquery. So I had to rename and re-function hundreds of functions, but this version should work again! Sorry for the hold up :p
v1.13.2 The Drafts edit was only loading 10 posts. Thanks to the friendly guy who caught this error in this script's forum. It was caused when I narrowed the responseText-HTML capture, to avoid those nasty self running percent scripts Tumblr just added. I just used a triple capturing regex to find that next page link href, needed to load.
v1.13.1 Fixed some bugs. I had to halt progress in 1.14 for some major bugs old and new. Tumblr added some kind of script tags <%> I don't know what they are, but they freeze requests to the Queue and Drafts. I narrowed the response regex, to only nab from the block of posts, to prevent these <%> things from running (they are meant to only run on the dashboard, so they throw errors in MPE.) I also removed two lines that were causing duplicates in Drafts and Queue. Oddly enough, these are the two lines I added to prevent duplicates in the first place. If you look in the source, you may find some commented lines for Mass Clickthrough links and Mass Captioning. Those are unfinished, so uncommenting them will only create nonfunctional widgets. Those will be in 1.14.0 when I finish. However debugging the old versions is first priority.
v1.13.0 Added some new features, mass publish and make a re-publishable draft from old posts (Re-As Draft). I fixed some fatal errors that were cause by prototype $(id).remove(), because that can only be called once then a fatal error if called again, because the removed id is null. I used prototype $(id).hide() instead. Also the console is getting crowded with custom buttons, so I tightened up the appearance a bit with CSS. Also I added a function to use like _100.jpg instead of _500.jpg (png/gif/etc) so the queue and drafts page opens faster. Also the publishing calls are asynchronous:false, so it doesn't flood dashboards.
v1.12.1 A Chrome user sent me an ask on Tumblr reminding me that wasn't working in Chrome. I checked and he was right. My source is so big that I had to split the append script in two halves because version 1.12.0 was causing (Maximum call stack size exceeded). This version should work in Chrome.
v1.12.0 I didn't find much bugs, but I cleaned up a few ends in my source and added some new features, Mass Backdate and Mass Make-Private. There may be some bugs, I've had posts turn into drafts and turn private when they were supposed to in my earlier runs. I couldn't make it happen twice so I must've fixed it. This gives me an idea for a "republish" feature. When the post became a draft, I had to republish it and it was on top of the dash and it retained it's notes... However, first I must recreate whatever I posted to /svc/post/update to turn an already published post back into a draft. Also be on the lookout for bugginess in the "show only" for posts without tags. I had a ask on Tumblr pointing out another bug that I couldn't recreate or fix.
v1.11.3 (I trashed v1.11.2 in my drawing board because Tumblr redesign caused errors) I fixed the drafts page and queue page, because my ajax grabs from the dashboard for those pages, and Tumblr redesigned the dashboard causing errors. Also added a new feature by request to move "drafts to the queue". This version is rushed because Tumblr redesigns caused it to not be functional, so I skipped putting in "move queue back to drafts" for now. That function is a lot more cryptic, and I was in a hurry because this was not functioning.
v1.11.1 I get some tumblr asks reporting that this did not work at all, and it occurred to me that some people might not click the link to MPE, but rather just going to the URL, http://www.tumblr.com/mega-editor (which does not have /name in it)... So I added an @include for that page and added a line to find blog name for name functions elsewhere in the HTML rather than the URL.
v1.11.0 I fixed a bug with the queue page dates because Tumblr changed the name of the array that holds all date/time information. I also fixed a bug that was causing leftover transports to put posts that shouldn't belong, from the main blog, into the drafts page and queue page. I also added a new feature "Lite Mode" because Tumblr's brick masonry (absolutely positioning on an ever running for loop) is really resource intensive and crashy. Use lite mode for a simple CSS inline grid.
v1.10.1 Not even an hour after 1.10 and the same friend found an error caused by some reused selection functions, I left in, that was causing instant deselect of all posts when "show only" is running. I'm so sorry for the inconvenience. This is a quick update.
v1.10 A lot of bug fixes, found some stupid mistakes I can't believe I missed. The labels for the checkbox in tag widgets were closed with </ a> instead of </label>, I can't believe it worked up until now. I also added a new feature "not this" selectors for selecting posts without tag or showing only NOT certain tags or types; another suggestion from bbcfalls. I caught a bug that was stopping the last ten posts tags from being available in tag features. And out of a feeling I painted the delete the button red, because I got a strange anon ask on Tumblr, I wasn't sure if he wanted to know how to delete all his posts, or he was angry he deleted all his posts. I think a red "delete" is harder to confuse with "deselect" that's named "unselect" btw.
v1.9.1 Do to hasty copy/paste I caused a bug with ID names of check boxes for "show only" and "posts with no tag" to malfunction. I corrected it this quick update.
v1.9 I fixed some major bugs that came with my hasty fixes for the redesign. I notice my tag widget box was stuck to the top absolute, not fixed, so it's fixed now pun intended. I made the custom tag widgets bigger, this required me to upload a new background to Tumblr because the default was only about 200px tall. NEW FEATURE! (as suggested by bbcfalls @tumblr) Option to show/hide posts with certain tags. The post types was my idea. I also found a variable to disable animation so I set it, it's only cosmetic (to disable animation) and animation makes the loading slower and crashy.
v1.8.2 Tumblr did another redesign with subliminal id name changes and missing elements that my script referenced to, so it was throwing errors, so I updated this version to work with the new changes. Please send me an /ask on Tumblr if this is failing to work. Tumblr Support informed me that not all blogs see redesigns while they're in their testing phase, so if people still have the old design, things might not look right. Also, if you notice the "Select by tag" is empty or missing tags, this is because the tags load secondly while the posts load. Give it 5 seconds and they will be all there. I made loading sporadic, because instant loading was making the browser crashy.
v1.8.1 Quick update. First Tumblr stuck in a vestigial follow button for some blogs, now they just removed it. Both actions cause a glitch in my script. Make up your mind, gra!
v1.8 I replaced my custom loader in the mass post editor because it was failing 50% of the time, and went back to Tumblr's default loader. (loading tags second, you'll notice the box shadow for tags loading into select by tag features) This means jump for month works! I was getting a lot of disappointed Tumblr /asks, for my crappy jump to month replacement. I also added drafts page. I got one request for the drafts page, so I figured that one in.
v1.7.2 This version should work for people who still have the original editor and people who have the new editor with the follow button. Some style is different, so it may not look the same to both kinds, but it is functional. I also speed up the jump to month, but it still has a lengthy pause compared to the native jump to month.
v1.7.1 I had to re-correct some old bugs I thought were fixed. I added a boolean function to prevent accidental selection/deselection when clicking tag widgets (like remove tags). When you clicked a tag widget or widget button, it was selecting the post in the layer bellow. I fixed it. I also fixed the date function as it was returning the wrong month for Feb 28 and weird old Tumblr posts with weekday contextual rather than actual dates. I also recommend updating Greasemonkey, if the page just opens and none of the posts show. I was having a hard time figuring out what was happening, pulling my hair out, but then I updated Greasemonkey and it went away.
Thank you all for your patience putting up with all my bugs until I correct them! I'm such a noob... and very sorry for inconveniences! :)
I did away with my unstable regex in place of prototype Element selectors. This killed my nightmare of hundreds of possible bugs. I added a cosmetic feature that allows you to increase decrease gutter width in-between bricks, and for easier selection. I fixed fatal errors with my loader with jump to month. I got an /ask on Tumblr from a guy with over 20k posts, so the post loader never hit the bottom, so I added a pause button. I also changed the tag loading to run live, so you don't have to wait for it to hit the bottom before selecting tag. I also show month blocks in the queue editor, using a future dates function from my other script. I changed block size for short/wide photos so they don't get lost in the wall, and for easier selection. I fixed the sort alphabetic tag lists to be case insensitive so lowercase aren't at the end of the list. I fixed several mouse errors that were in previous versions that were causing unwanted deselects, and widget closes. I also fixed some preview errors with audio/video posts. I also fixed a fatal error that came up in previous versions when deleting queue posts.
I fixed another error in my date parser that makes all 2012 dates, the 20th and I added a vital reg match for link-type posts. Up until now, it would freeze the whole thing. I didn't notice until I made a link post just now. There is also an error on Tumblr's end that makes weeks at random have day-of-week contextual, which throws off my date parser, but I'm not going to figure that until I get some sleep.
a Chrome user on Tumblr reported this didn't work in Tampermonkey. This version should work now. I wrote a safeWindow converter for Tampermonkey. Here is a link: http://suicidecon.com/safe-window-for-tampermon...
Quick fix: I fixed a math error in my date parser that made January 27-31 dates render as negative December 2012 dates.
Latest: I got rid of some silly type-o's from v1.4 because I updated too hastilly.
I added a select by tag option to both the mass post editor and the mass queue editor. Tumblr's has silly 100 post selection limit server side, so I altered my "select all" and "select by tag" a max of 100 at time and then 100 more option. I also did away with the slow loading animation. It still only loads 10 posts at a time, but that is Tumblr rules. They progressively load everything. I also removed some fatal bugs in the post loading that prevents stops of the whole page.
quick update: I found bug that causes selection box to not deselect (when shrinking) while holding shift, so that's now fixed.
I finally got tag remove in Queue edit to work. Mass Queue Editor is complete!
Added button to go back to main editor from queue editor...
Fixed bug that causes selection box to draw when clicking top buttons and tag editing widgets.
changed the queue loading GIF to the correct GIF, and not the tag loading GIF (cosmetic bug)
Upon tweaking, the 100 post selection limit cannot be overridden because 100+ fails to edit server side, so I added two lines to prevent going over with Select All and Drag Select. This prevents Tumblr's nasty alert.
Added hasClassName('highlighted') boolean to speed up selection box speed