johnmuhl / javascript-tools-tmbundle forked from subtleGradient/javascript-tools.tmbundle

Essential Tools for developing Javascript in TextMate

This URL has Read+Write access

javascript-tools-tmbundle / Macros / Convert Javascript to Bookmarklet.tmMacro
100644 92 lines (91 sloc) 2.299 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>commands</key>
<array>
<dict>
<key>argument</key>
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>ruby "$TM_BUNDLE_SUPPORT/bin/jsmin.rb"
</string>
<key>input</key>
<string>selection</string>
<key>keyEquivalent</key>
<string>^~Q</string>
<key>name</key>
<string>Minimize selection</string>
<key>output</key>
<string>replaceSelectedText</string>
<key>scope</key>
<string>source.js, source.prototype.js</string>
<key>uuid</key>
<string>E620A7EF-DB9B-48D9-874F-60EAF426E70D</string>
</dict>
<key>command</key>
<string>executeCommandWithOptions:</string>
</dict>
<dict>
<key>argument</key>
<dict>
<key>action</key>
<string>replaceAll</string>
<key>findInProjectIgnoreCase</key>
<false/>
<key>findInProjectRegularExpression</key>
<false/>
<key>findString</key>
<string>\n| </string>
<key>ignoreCase</key>
<true/>
<key>regularExpression</key>
<true/>
<key>replaceAllScope</key>
<string>selection</string>
<key>replaceString</key>
<string>%20</string>
<key>wrapAround</key>
<true/>
</dict>
<key>command</key>
<string>findWithOptions:</string>
</dict>
<dict>
<key>argument</key>
<dict>
<key>action</key>
<string>replaceAll</string>
<key>findInProjectIgnoreCase</key>
<false/>
<key>findInProjectRegularExpression</key>
<false/>
<key>findString</key>
<string>^</string>
<key>ignoreCase</key>
<true/>
<key>regularExpression</key>
<true/>
<key>replaceAllScope</key>
<string>selection</string>
<key>replaceString</key>
<string>javascript:</string>
<key>wrapAround</key>
<true/>
</dict>
<key>command</key>
<string>findWithOptions:</string>
</dict>
</array>
<key>keyEquivalent</key>
<string>^~Q</string>
<key>name</key>
<string>Convert Javascript to Bookmarklet ᵇᵉᵗᵃ</string>
<key>scope</key>
<string>source.js</string>
<key>uuid</key>
<string>67347C19-DA7A-41B8-8C48-8CC92E11E4E3</string>
</dict>
</plist>