Skip to content

Commit

Permalink
Oop, addCommandLineMenuEvent isn't what we thought it was
Browse files Browse the repository at this point in the history
  • Loading branch information
adayoung committed Dec 27, 2024
1 parent e1c9919 commit 425c02a
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions templates/api-about.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
Alias pattern: ^apaste( .+)?$
Script:

cecho("\n<white>[<pink>Ada<white>]: Attempting to paste... please wait!")
cecho("\n&lt;white&gt;[&lt;pink&gt;Ada&lt;white&gt;]: Attempting to paste... please wait!")
toPastebin(matches[2] or '')
--------------------------------------------------------------------------------

Expand Down Expand Up @@ -151,9 +151,9 @@
function Pastebin(event, one, two)
if event == "sysPostHttpDone" then
local response = yajl.to_value(two)
cecho("\n<white>[<pink>Ada<white>]: Success! " ..response.url)
cecho("\n&lt;white&gt;[&lt;pink&gt;Ada&lt;white&gt;]: Success! " ..response.url)
elseif event == "sysPostHttpError" then
cecho("\n<white>[<pink>Ada<white>]: Oop, error! " ..one)
cecho("\n&lt;white&gt;[&lt;pink&gt;Ada&lt;white&gt;]: Oop, error! " ..one)
end
end
</pre>
Expand All @@ -165,13 +165,8 @@
<li>Right click and then click on Copy HTML menu item to copy</li>
<li>Type <code>apaste</code> in the Mudlet command line!</li>
<li>Or type <code>apaste Some title!</code> to paste with a title!</li>
<li>Enjoy! 🎉</li>
</ul>
<p>
Newer versions of Mudlet (v4.14+) have a feature called <a class="text-decoration-none"
href="https://wiki.mudlet.org/w/Manual:Lua_Functions#addCommandLineMenuEvent"
target="_blank" rel="noopener">addCommandLineMenuEvent</a> which may make it possible
to even add a menu item to right-click and paste in one go! See if you can make that work!
</p>
</article>
</div>
</div>
Expand Down

0 comments on commit 425c02a

Please sign in to comment.