mojombo / clippy Goto Github PK
View Code? Open in Web Editor NEWClippy is a very simple Flash widget that makes it possible to place arbitrary text onto the client's clipboard.
License: MIT License
Clippy is a very simple Flash widget that makes it possible to place arbitrary text onto the client's clipboard.
License: MIT License
There should be a param to set the text color
Thanks for the awesome clippy code.
I am using clippy to copy some code snippets (multiple line). When I paste in notepad++ or gvim all new line is appearing perfectly. But not able to see the new line on the notepad, all are appearing on one line.
I've been testing to be sure I set into variable {text:'%20encodedtest&20etc..'} encoded text but seems when I copy from clipboard the text has been encoded. Really if it's a URL - that's my case - it'll be good idea mantaining with initial format. I tested with several browsers and the problem is not there. I don't know if this kind of conversion is something normal or made into clippy code, if it's the case I think some variable to indicate not doing it mandatory will be apreciated.
I'd like to use something like jQuery to update the flashVars attribute of clippy, so it clips different things at runtime. A workaround is to destroy and re-create clippy entirely, but it seems like it'd be possible to make clippy just read from the flashvars as the user clicks?
I tried building the project. I installed
when building with
I do get a new clippy.swf but when loading this up there is no image in the widget. This happens without changing any source code. I'm using Mac OS X 10.7.2
RESULT: The button has no accessible text of any kind. If you were using the screen reader NVDA, it would identify the button as "button button", which is bad.
EXPECTED: The Clippy app should expose accessible information, and it should mirror the text that's shown to sighted users. WebAIM has an overview of how to do this at http://webaim.org/techniques/flash/text.
$ haxe clippy.hx
Error : Invalid class name clippy.hx
Had to rename clippy.hx to Clippy.hx
All worked well.
can't customize the ui now~~thanks!
I can't get the build/clippy.swf to work in my project. Interestingly, if I use the path to the swf which github is using, things work fine. This leads me to believe there's an issue with the swf in the repo. Anyone have any ideas?
It looks like github it using a new version with tooltips instead of keeping blank whitespace to the right of the button.
Anyone know how we can track down a copy of that bad boy?
the remaining text is ignored :( This is a weird issue.
If I used: <%= clippy("https://foo.com/abc?status=true&id=1234") %>
the text that actually goes to clipboard is "https://foo.com/abc?status=true" i.e. the first '&' and remaining text is stripped off.
Anybody?
Is it possible to disable this feature?
What i need is a link that users can copy paste in there browser
We at VersionEye are working hard to keep up the quality of the bower's registry.
We just finished our initial analysis of the quality of the Bower.io registry:
7530 - registered packages, 224 of them doesnt exists anymore;
We analysed 7306 existing packages and 1070 of them don't have bower.json on the master branch ( that's where a Bower client pulls a data ).
Sadly, your library mojombo/clippy
is one of them.
Can you spare 15 minutes to help us to make Bower better?
Just add a new file bower.json
and change attributes.
{
"name": "mojombo/clippy",
"version": "1.0.0",
"main": "path/to/main.css",
"description": "please add it",
"license": "Eclipse",
"ignore": [
".jshintrc",
"**/*.txt"
],
"dependencies": {
"<dependency_name>": "<semantic_version>",
"<dependency_name>": "<Local_folder>",
"<dependency_name>": "<package>"
},
"devDependencies": {
"<test-framework-name>": "<version>"
}
}
Read more about bower.json on the official spefication and nodejs semver library has great examples of proper versioning.
NB! Please validate your bower.json with jsonlint before commiting your updates.
Thank you!
Timo,
twitter: @versioneye
email: [email protected]
VersionEye - no more legacy software!
It seems that Clippy is unable to copy + signs.
To reproduce, using the rails helper, use the code bellow:
<%=h clippy("+++").html_safe %>
I just accidentally created a clippy with no content, and I was confused when I tested this and the pasted output was the same as the previous clippy on the page. I assumed I had entered the same text in two places at first. Apparently, because there was no content, nothing was copied to the clipboard so the previous contents of the clipboard were still there. However I still got the "copied!" message when I clicked.
It might be nice to have some better feedback here, maybe (a) a really obvious error when you create a blank clippy like a red X to tell the dev that something is wrong (b) a message like "Oops, nothing to copy!" after clicking or (c) copy blank content to the clipboard so previous contents are overwritten
On my end I'm just adding better verification to my helper function, so that will fix this for me :-)
Btw I'm using clippy here: http://www.dexy.it/docs/tutorials/0-hello-world/ if you're curious (scroll down a bit). It's very helpful! I've built it in to one of my filters so the source code goes directly in.
Hi,
clippy is a dependency of Gerrit, which I'd like to package for Debian and thus I'd also need to package clippy (or patch it out). Could you be so kind to spend some time and integrate the many pull requests to clippy?
Or would you like to hand clippy over to somebody else?
Thank you very much!
test
text = 'sometext&othertext'
clippy(text)
result: 'sometext' is copied to the clipboard, but we want 'sometext&othertext'
Do I have to escape the ampertand or something?
Probably not actionable until FF4.0 comes out of beta, but I'm seeing a pattern where clippy only works for the first instance on any given page; every other use just draws a black, unclickable square. The page in question is working for any other browser. Very possibly a Mozilla issue, though I haven't encountered problems with other flash widgets yet.
Is this currently broken? Taking the build/clippy.swf I get an empty swf object on the screen (no image or text). I've followed the instructions but it didn't work in my rails project or in a simple test.html page.
I tried also re-compiling but after renaming clippy.swf to Clippy.swf and successfully compiling I get the same thing - nothing appearing on screen.
I managed to find a version which does work - the compiled version from the clippy-jquery version works fine:
https://github.com/jimmysawczuk/clippy-jquery
Anyone got any ideas?
I think clippy does not work on IE. I also see that none of the "clone repo git URL" clippies on github.com work on IE.
Is it just me?
To apply internationalization to clippy it would be really good to have the possibility to edit also the text of the label and the "copied" text...
The following implementation probably will work:
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.display.SimpleButton;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
class Clippy {
// Main
static function main() {
var text:String = flash.Lib.current.loaderInfo.parameters.text;
var labelText:String = flash.Lib.current.loaderInfo.parameters.labelText;
var copiedText:String = flash.Lib.current.loaderInfo.parameters.copiedText;
// label
var label:TextField = new TextField();
var format:TextFormat = new TextFormat("Arial", 10);
label.text = labelText;
label.setTextFormat(format);
label.textColor = 0x888888;
label.selectable = false;
label.x = 15;
label.visible = false;
flash.Lib.current.addChild(label);
// button
var button:SimpleButton = new SimpleButton();
button.useHandCursor = true;
button.upState = flash.Lib.attach("button_up");
button.overState = flash.Lib.attach("button_over");
button.downState = flash.Lib.attach("button_down");
button.hitTestState = flash.Lib.attach("button_down");
button.addEventListener(MouseEvent.MOUSE_UP, function(e:MouseEvent) {
flash.system.System.setClipboard(text);
label.text = copiedText;
label.setTextFormat(format);
});
button.addEventListener(MouseEvent.MOUSE_OVER, function(e:MouseEvent) {
label.visible = true;
});
button.addEventListener(MouseEvent.MOUSE_OUT, function(e:MouseEvent) {
label.visible = false;
label.text = labelText;
label.setTextFormat(format);
});
flash.Lib.current.addChild(button);
}
}
And replace it with some other icon or with some text?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.