General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
Java script
Posted by: DachaArh
Date: April 06, 2008 08:32PM

can user defined java scripts be integrated in k-meleon ..

where to find them?

Only thing what I need is auto copy, like in trillian amd mirc, just to select text and it to be copied to clipboard ..



is it possible in any way ....

Options: ReplyQuote
Re: Java script
Posted by: desga2
Date: April 06, 2008 09:39PM

You can do a K-Meleon macro to execute a JavaScript code using instruction:
injectJS( JS_CODE );

But i don't know if you could implemented an autocopy system.

K-Meleon in Spanish

Options: ReplyQuote
Re: Java script
Posted by: DachaArh
Date: April 07, 2008 05:20AM

thanks for your reply ....


anyone else ?

Options: ReplyQuote
Re: Java script
Posted by: DachaArh
Date: April 07, 2008 05:27AM

sorry for bump I have this auto copy script, how should it look to become macro ?





// ==UserScript==
// @name Autocopy
// @author Lex1
// @version 1.1.1
// ==/UserScript==

document.addEventListener("mouseup", function(e){if(document.getSelection()){
var html_selection=document.createElement('div');
html_selection.appendChild(window.getSelection().getRangeAt(0).cloneContents());
var lnks = html_selection.getElementsByTagName('*'); for(var i=0, li; li=lnks; i++){if(li.href)li.href=li.href;if(li.src)li.src=li.src};

var fr=document.createElement('iframe'); fr.setAttribute('id', 'tr_dummy');fr.setAttribute('frameborder', '0');
fr.setAttribute('style', 'width:0px;height:0px;visibility:hidden;position:absolute;left:-999em;');
fr.setAttribute('src', 'data:text/cwf;charset=UTF-8,'+encodeURIComponent('SourceURL:'+document.location+'\r\n\r\n<html><head><meta http-equiv=Content-Type content=\'text/html; charset=utf-8\'></head><body><!--StartFragment-->'+html_selection.innerHTML+'<!--EndFragment--></body></html>'));
document.documentElement.appendChild(fr); var tr=document.getElementById('tr_dummy');if(tr){tr.parentNode.removeChild(tr)};
}},false);


Options: ReplyQuote
Re: Java script
Posted by: JujuLand
Date: April 07, 2008 08:05AM

Perhaps using GreaseMeleon ???

A+



Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:38.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/76.0


Web: http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr



Ubuntu 12.04 - Gramps 3.4.9 - Harbour 3.2.0 - Hwgui 2.20-3 - K-Meleon 76.0 rc



Options: ReplyQuote
Re: Java script
Posted by: DachaArh
Date: April 07, 2008 05:10PM

Quote
JujuLand
Perhaps using GreaseMeleon ???

A+

I do not understand you ...?

Options: ReplyQuote
Re: Java script
Posted by: JujuLand
Date: April 07, 2008 07:17PM

GreaseMeleon is an extension based on GreaseMonkey an extension for Firefox which allows to execute script for designed pages (by the user).

You can find it on my K-Meleon Extension page

A+



Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:38.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/76.0


Web: http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr



Ubuntu 12.04 - Gramps 3.4.9 - Harbour 3.2.0 - Hwgui 2.20-3 - K-Meleon 76.0 rc



Options: ReplyQuote
Re: Java script
Posted by: DachaArh
Date: April 07, 2008 10:59PM

I found it, thanks, but I can't find autocopy script that is working sad smiley

Options: ReplyQuote
Re: Java script
Posted by: JujuLand
Date: April 08, 2008 07:40AM

This script doesn't exist for GreaseMeleon, but the goal, is to adapt your script to the structure of GreaseMeleon to make it work. I suppose there is no more modifications to do to be able to make it work, even I'm not able to do that.

A+



Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:38.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/76.0


Web: http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr



Ubuntu 12.04 - Gramps 3.4.9 - Harbour 3.2.0 - Hwgui 2.20-3 - K-Meleon 76.0 rc



Options: ReplyQuote
Re: Java script
Posted by: DachaArh
Date: April 08, 2008 10:34AM

so that script can't be edited ? sad smiley

Options: ReplyQuote


K-Meleon forum is powered by Phorum.