Created
January 31, 2021 06:50
-
-
Save lyo/9711943bbd8678cae419d56a546d9a13 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- reblogcommand.user.js Tue Apr 15 22:00:15 2008 | |
| +++ reblogcommand_with_privatemode_vt.user.js Tue Apr 15 22:07:14 2008 | |
| @@ -1,7 +1,8 @@ | |
| // ==UserScript== | |
| -// @name ReblogCommand | |
| +// @name ReblogCommand_with_privatemode_vt | |
| // @namespace http://white.s151.xrea.com/ | |
| -// @include * | |
| +// @include http://reader.livedoor.com/reader/* | |
| +// @include http://fastladder.com/reader/* | |
| // ==/UserScript== | |
| (function(){ | |
| @@ -95,6 +96,16 @@ | |
| ); | |
| } | |
| +function privateReblog(aURL){ | |
| + return invokeTumblrMethod( | |
| + aURL, 'privateReblog', { | |
| + start: 'Private Reblog ...', | |
| + done: 'Private Reblog ... done.', | |
| + manual: 'reblog manually ? ', | |
| + } | |
| + ); | |
| +} | |
| + | |
| function deletePost(aURL){ | |
| console.log("deletePost", aURL); | |
| return invokeTumblrMethod( | |
| @@ -163,6 +174,15 @@ | |
| }}); | |
| window.Minibuffer.addShortcutkey({ | |
| + key: 'y', | |
| + description: 'Private reblog', | |
| + command: function(){ | |
| + var target_cmd = getTargetCommand(); | |
| + var clear_pin = (target_cmd == 'pinned-or-current-link') ? ' | clear-pin' : ''; | |
| + window.Minibuffer.execute(target_cmd + ' | privateReblog' + clear_pin); | |
| + }}); | |
| + | |
| +window.Minibuffer.addShortcutkey({ | |
| key: 'T', | |
| description: 'Reblog manually', | |
| command: function(){ | |
| @@ -188,7 +208,7 @@ | |
| } | |
| // reblog | |
| - if(args.length = 1 && args[0] == '-m'){ | |
| + if(args.length == 1 && args[0] == '-m'){ | |
| urls.forEach(function(aURL){ | |
| manualMethod && manualMethod(aURL); | |
| }); | |
| @@ -222,6 +242,11 @@ | |
| window.Minibuffer.addCommand({ | |
| name: 'reblog', | |
| command: function (stdin) { return tumblrCommand.apply(this,[ stdin, reblog, reblogManually] ) } | |
| +}); | |
| + | |
| +window.Minibuffer.addCommand({ | |
| + name: 'privateReblog', | |
| + command: function (stdin) { return tumblrCommand.apply(this,[ stdin, privateReblog, null] ) } | |
| }); | |
| window.Minibuffer.addCommand({ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment