JScript Some of the properties are actually very good, but it is only IE support, such as copying and pasting properties
The following section of the copied and pasted JavaScript code can support Ie/firefox/mozilla/ns, the foreigner site appears to
Just need to modify the About:config in Firefox under a property
<script language= "javascript" type= "Text/javascript" >
<!--
function Copy_clip (meintext)
{
if (Window.clipboarddata)
{
The Ie-manier
Window.clipboardData.setData ("Text", Meintext);
Waarschijnlijk niet de beste manier om moz/ns te detecteren;
Het is mij echter onbekend vanaf welke versie dit precies Werkt:
}
else if (window.netscape)
{
The DIT is Belangrijk maar staat nergens Duidelijk Vermeld:
You are have to sign the code to enable this, or the notes below
Netscape.security.PrivilegeManager.enablePrivilege (' Universalxpconnect ');
Maak een interface naar het clipboard
var clip = components.classes[' @mozilla. Org/widget/clipboard;1 ']
. CreateInstance (Components.interfaces.nsIClipboard);
if (!clip) return;
Maak een transferable
var trans = components.classes[' @mozilla. Org/widget/transferable;1 ']
. CreateInstance (Components.interfaces.nsITransferable);
if (!trans) return;
Specificeer Wat voor soort data we op Willen Halen; Text in dit Geval
Trans.adddataflavor (' Text/unicode ');
Om de data uit de transferable te Halen hebben we 2 Nieuwe Objecten
Nodig om het in op te slaan
var str = new Object ();
var len = new Object ();
var str = components.classes["@mozilla. Org/supports-string;1"]
. CreateInstance (Components.interfaces.nsISupportsString);
var Copytext=meintext;
Str.data=copytext;
Trans.settransferdata ("Text/unicode", str,copytext.length*2);
var Clipid=components.interfaces.nsiclipboard;
if (!clip) return false;
Clip.setdata (Trans,null,clipid.kglobalclipboard);
}
Alert ("Following info is copied to your clipboard:\n\n" + meintext);
return false;
}
-->
</script>
Notes about security:
A cause of the tight security settings in Mozilla/have to sign the JavaScript to make it work another way are to Your Firefox/mozilla settings
To does this add this line to your prefs.js file in your Firefox/mozilla user profile directory
User_pref ("Signed.applets.codebase_principal_support", true);
or change it from within the browser with calling the "About:config" page