Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Apart from the bugs that you have tried to patch up earlier, kwaping found another link that didn't work well in your current FF extension: Voting/Experience System. So I took the plunge and looked at how it all ticked...

I found out you were using the wrong function, you shouldn't have used decodeURI(), but unescape()!

There still is a bug in FF though, because when testing Javascript using alert(), both in the extension and from the Javascript Console command line, I found that it was partially decoding the string, and thus, what alert() showed wasn't the original string, but a partly decoded variation of it.

Anyway, unescape() fixed it, and I could just completely remove your kludge.

Get the patched version at http://users.pandora.be/bartl/monklinks/. There are two archives: the patched XPI file, and a ZIP archive containing the same files but unpacked, ready for editing, plus a little Windows batch script (just run it by doubleclicking) to wrap up the files, possibly after editing, back into a new XPI file. You need an Info-ZIP compatible command line ZIP, which comes with UnxUtils, for example.

BTW people, if you're having trouble installing the XPI file directly from the site, just save it to disk and drop it on Firefox, either on a window, or on its program icon.

Ah, another feature I added was support for plain links, which get turned into the [http://...|link text] format, taking care to remove any "[", "]" and "|" characters from the text.

Oh, and I moved its position in the popupmenu to a more appropriate place, right under the "Copy Link Location" item.

I've got a few more ideas still, like adding support for other types of PM links, such as to http://perldoc.org/, as well as copying the URL and title (or perhaps selected text) of the current page in case you rightclicked on something other than a link — thus, something like Copy URL + does. The latter seems like a big change to me, so it will be for another day. Ideally, it should still work after you submitted a POST, so, in that case, it should scan for the node id in the current page.

I left your copyright and author notices completely unaltered, I just bumped the version number from 0.3 to 0.3.1. It's still your baby.

p.s. I don't have Firefox 2 as yet, so it's not compatible with it yet. Feel free to try if it could still work, by editing install.rdf in the root dir, and bumping up the <em:maxVersion> value, and repackage.

p.p.s. I started out from the version you put up on planetscape's site. You say here it's version 0.5, though internally, everything said 0.3. Oh well.

Update Now version 0.3.2, supports more link styles: module:// and dist:// for CPAN, doc:// for perldoc.perl.org, href:// for odd links on this site, and plain http:// for anything else. It'll try to uyse the actual link text for the less normalized URLs (the latter two). And I've upped the maxVersion to 2.0, though I haven't tried it, I have the impression not much has changed in the Firefox Extension API. Here's for hoping.

Same URL for the directory listing.


In reply to Re^2: Monk Links - Copy Perlmonks-links to the clipboard in on-site-format by bart
in thread Monk Links - Copy Perlmonks-links to the clipboard in on-site-format by holli

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (8)
As of 2024-04-19 15:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found