Extensions :  K-Meleon Web Browser Forum
All about K-Meleon extensions. 
Simple URL shortener (tinyurl.com API)
Posted by: Kris_88
Date: November 27, 2020 06:14AM

A simple URL shortener using tinyurl.com API.
Places the shortened URL of the current tab on the clipboard.

This is restartless add-on.
File -> Open -> All Files -> tinyurl@om.xpi
You can manage it in about:addons page.

This add-on creates the button on the toolbar
Default toolbar: "Browser Con&figuration"
Create "extensions.tinyurl@om.toolbar" string preference (in about:config page)
to override default.

Attachments: tinyurl@om.zip (5.5 KB)  
Options: ReplyQuote
Re: Simple URL shortener (tinyurl.com API)
Posted by: siria
Date: November 27, 2020 11:45AM

Yumm.... thanks! This looks 99.9% to me like it might be the long since missed magic function "gBrowser" from Firefox addons?! It gets the current page! Needed e.g. for creating long page screenshots, or adblock-addon configuration buttons as in Firefox, for uBlock button etc....

jsb.RegisterCmd(CmdName, 'Tiny URL', function(wind, mode, arg) {
var url = jsb.GetActiveBrowser().contentDOMWindow.document.location.href;

And this looks very interesting function too:
ReadDataFromWeb(TinyUrlService+url, 10000, function(isOK, resp) {

Aargh, all the great new prospects, but can't try it myself, stuck with too old KM-version, and currently no time for playing with addons anyway sad smiley

(NB: screenshots might be helpful, they can be attached directly to posts too... and a link to forum post inside xpi?)

Options: ReplyQuote
Re: Simple URL shortener (tinyurl.com API)
Posted by: Kris_88
Date: November 28, 2020 04:58AM

Quote
siria
... for creating long page screenshots

Yes, I made such an add-on too.
As an experiment so far.
I'll post it in a some days.

Quote
siria
stuck with too old KM-version

Which version of KM are you using?

Quote
siria
(NB: screenshots might be helpful, they can be attached directly to posts too... and a link to forum post inside xpi?)

OK.

Attachments: tinyurl@om2.zip (5.5 KB)   screen1.png (89.2 KB)  
Options: ReplyQuote


K-Meleon forum is powered by Phorum.