Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Major Quotations extension update
If you're using the latest Vanilla revision, and wondering why the Quotations extension wasn't working, well I fixed it. The changes to the XHTML templates were messing up the javascript, causing it to return blanks. All has been rectified.
Also I updated the stylesheet to reflect the new layout, and to be a little more "Vanilla-like".
Get it here
Screenshot:
Also I updated the stylesheet to reflect the new layout, and to be a little more "Vanilla-like".
Get it here
Screenshot:
0
Comments
i added Extension Url: and it worked.
oh, you mean like if i selected some text and an image, i'd want the image included?
maybe there's a clever solution but i can't think of it. maybe match the first part and the last part of the selection, using the comment id as identified by the quote link, with a regex, to pull the rest of the stuff in between. sounds unreliable at best
anyway my users are happy with the partial selection as it works now.
function quote() { var d = document.createElement("p"), s = getSelection(); for(var i = 0; i < s.rangeCount; ++i) { var r = s.getRangeAt(i); if (!r.collapsed) d.appendChild(r.cloneContents()); } alert(d.innerHTML); }
put that in a document with some html-formatted text, and call quote with onmousedown when you've got a selection. it worked perfectly for me in firefox 1.5!
for example if i select all of this: ddddddsss
it returns ddd<u>ddd</u>sss, so it's missing the <em> tags.
but i think i can make it work.
In Internet Explorer, it just ignores the selection and quotes the whole post; I'll mess with that later.
My code is here, if you want to look at it.
oh, i think i see. you need to use onmousedown instead of onclick for the quote link.
no matter where i click quote on the page, it always cites the author of the last comment on the page. i had that problem for a while and i ended up having to re-analyze the dom tree and get all the elements by a different method.
my code is here but it looks nothing like yours
also i haven't added the new appendChild business yet.
I think it's finally working. Of course, I thought that the last time, and there were still bugs.
Anyone want to try it?
Ithcy: I ended up using some of your code.
You can try it out over at this board
Still a very nice extension, good work Bergamot!