Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

updated you great plugin #1

Merged
merged 1 commit into from

2 participants

@juliovedovatto

Hello Niklas.

I'm Julio, an developer here in Brazil.

Today one of my clientes asked to find a way to insert a link of his site when users copy content.

After searching a lot on the Interwebz (discarding flash solutions) I found the experiment of your plugin. So I tested across the browsers and it works!

So I made an fork of the project and commited a litte fix for Firefox browsers. In Firefox 11, when I copy a text, the same blinks so fast, but it's noticeable for the user. With my fix, apparently, works perfectly.

I hope you like my contribution.

Cheers,
Julio Vedovatto

@niklasvh
Owner

Hi Julio,

Glad you found it useful, and thanks for the Firefox fix :)

@niklasvh niklasvh merged commit 279330a into niklasvh:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 13, 2012
  1. @juliovedovatto
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 7 deletions.
  1. +3 −7 jquery.plugin.clipboard.js
View
10 jquery.plugin.clipboard.js
@@ -53,10 +53,8 @@
var s = window.getSelection();
var r = s.getRangeAt(0);
-
-
if (options.append!==null){
- var a = $('<span />').html(options.append);
+ var a = $('<span style="display: inline-block; width: 0px; height: 0px; overflow: hidden; zoom: 1;" />').html(options.append);
var tmpr = s.getRangeAt(s.rangeCount-1);
@@ -74,10 +72,8 @@
}
-
-
if (options.prepend!==null){
- var n = $('<span />').html(options.prepend);
+ var n = $('<span style="display: inline-block; width: 0px; height: 0px; overflow: hidden; zoom: 1;" />').html(options.prepend);
r.insertNode(n[0]);
@@ -106,4 +102,4 @@
return this;
}
-})( jQuery );
+})( jQuery );
Something went wrong with that request. Please try again.