![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
I added this wrapper to give access to the zclip Jquery plugin. Nevertheless I can not recommend Zclip. A better solution is to use the zeroclipboard-rails.
Adds easy copytoclipboard functionality to your html-elements this is done by including the Jquery zClip libary to Rails 3.x.
Add this line to your application's Gemfile:
gem 'zclip-rails'
And then execute:
$ bundle
Add this line to your application.js:
//= require zclip
Add an element (button, input, div, span etc.) somewhere in your .erb template e.g.:
<button type="button" id="copy-some-txt">example</button>
Add this in some required js file of your app:
$('#copy-some-txt').zclip({
copy: "this is the text to copy"
});
$('#copy-some-txt').zclip({
copy: "this is the text to copy",
beforeCopy: function() {
alert("I am going to copy some text to your clipboard");
},
afterCopy: function() {
alert("done");
}
});
Settings | ||
---|---|---|
Variable |
Default Value |
Available Values |
copy * | null | any string, or any javascript expression or function that returns a string |
afterCopy | null | specify a function to call after text is copied. (your afterCopy function will overwrite the default alert box.) |
beforeCopy | null | specify a function to call before text is copied. |
clickAfter | true | true false |
setHandCursor | true | true false |
setCSSEffects | true | true false |
* required |
zClip is a flash overlay, so it must provide the target element with "hover" and "active" classes to simulate native :hover and :active states. Be sure to write your CSS as follows for best results:
a:hover, a.hover {...}
a:active, a.active {...}
$('a.copy').zclip('show'); // enable zClip on the selected element
$('a.copy').zclip('hide'); // hide zClip on the selected element
$('a.copy').zclip('remove'); // remove zClip from the selected element
The Zero Clipboard Library has been tested on the following browsers / platforms:
Browser | Windows XP SP3 | Windows Vista | Mac OS X Leopard |
Internet Exploder | 7.0 | 7.0 | - |
Firefox | 3.0 | 3.0 | 3.0 |
Safari | - | - | 3.0 |
Google Chrome | 1.0 | 1.0 | - |
Adobe Flash Flash Player versions 9 and 10 are supported.
Thanks to Joseph Huckaby for writing the zeroclipboard libary.
Thanks to steamdev.com for writing the jQuery wrapper.
Thanks to all the contributers to this Project.
git checkout -b my-new-feature
)git commit -am 'Added some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that zclip-rails demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.