Permalink
Browse files

updated vandalism commands to work with history page

git-svn-id: http://svn.textmate.org/trunk/Bundles/Mediawiki.tmbundle@12028 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
1 parent a996489 commit 8a5491d8e6437eb5677e5247e3ddf6edc3032f20 Timothy Bates committed May 19, 2011
Showing with 16 additions and 2 deletions.
  1. +8 −1 Commands/vandalism (UNintentional).tmCommand
  2. +8 −1 Commands/vandalism (intentional).tmCommand
View
9 Commands/vandalism (UNintentional).tmCommand
@@ -8,8 +8,15 @@
<string># input is selection or document
osascript -e 'on run(theCode)' \
-e 'tell application "Google Chrome" to set t to title of active tab of window 1' \
+-e 'set a to "Revision history of "' \
+-e 'set revLength to length of characters of a' \
+-e 'if (characters 1 thru revLength of t) = a then' \
+-e ' set revLength to length of characters of a' \
+-e 'else' \
+-e ' set revLength to 1' \
+-e 'end' \
-e 'try'\
- -e ' set t to (characters 1 thru -36 of t) as string --for wikipedia'\
+ -e ' set t to (characters revLength thru -36 of t) as string --for wikipedia'\
-e 'on error'\
-e ' set t to t'\
-e 'end try'\
View
9 Commands/vandalism (intentional).tmCommand
@@ -8,8 +8,15 @@
<string># input is selection or document
osascript -e 'on run(theCode)' \
-e 'tell application "Google Chrome" to set t to title of active tab of window 1' \
+-e 'set a to "Revision history of "' \
+-e 'set revLength to length of characters of a' \
+-e 'if (characters 1 thru revLength of t) = a then' \
+-e ' set revLength to length of characters of a' \
+-e 'else' \
+-e ' set revLength to 1' \
+-e 'end' \
-e 'try'\
- -e ' set t to (characters 1 thru -36 of t) as string --for wikipedia'\
+ -e ' set t to (characters revLength thru -36 of t) as string --for wikipedia'\
-e 'on error'\
-e ' set t to t'\
-e 'end try'\

0 comments on commit 8a5491d

Please sign in to comment.