Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

[Confirmed] Flash 10 problem: No more Copy Code to Clipboard


  • Please log in to reply
45 replies to this topic
SKAN
  • Administrators
  • 9115 posts
  • Last active:
  • Joined: 26 Dec 2005

I've removed the Copy link from non-MSIE browsers


Shows up in Google Chrome.. :roll:
kWo4Lk1.png

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
The "Copy" link will appear if the window.clipboardData object exists in JavaScript. So maybe Chrome has that object, or maybe you just have to do a Control-F5 (or equivalent) to force a reload of the page (or purge the browser cache of the old "code.js" file).

SKAN
  • Administrators
  • 9115 posts
  • Last active:
  • Joined: 26 Dec 2005

purge the browser cache


That was it .. Thanks Mr.Chris.

haichen
  • Members
  • 200 posts
  • Last active: Oct 20 2013 01:14 PM
  • Joined: 05 Feb 2007
I don't know how phpbb works, but perhaps it is possible to save the codebox content (when writing the article) into a textfile, which can be adressed with a downloadlink and also included (as text) in the forumarticle .
Perhaps by a serverside processing. Only a sudden dumb idea.

polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012

I've removed the Copy link from non-MSIE browsers.

Flash 9 is still quite common, if you want to support more visitors I recommend changing cl = window.clipboardData || false; to cl = window.clipboardData || /\d+/.exec(navigator.plugins['Shockwave Flash'].description)[0] < 10 or similar.

autohotkey.com/net Site Manager

 

Contact me by email (polyethene at autohotkey.net) or message tidbit


jballi
  • Members
  • 1029 posts
  • Last active:
  • Joined: 01 Oct 2005

Flash 9 is still quite common, if you want to support more visitors I recommend changing...

I'm one of the 9 Flashers (Err... I'm mean Flash 9'ers). It would be nice to be able to have the "Copy" link back.

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

Flash 9 is still quite common, if you want to support more visitors I recommend changing cl = window.clipboardData || false; to cl = window.clipboardData || /\d+/.exec(navigator.plugins['Shockwave Flash'].description)[0] < 10 or similar.

Thanks; I have applied this change.

distressed guest
  • Guests
  • Last active:
  • Joined: --

Thanks; I have applied this change.

Ah, so you are the culprit. :)

Chris, I am afraid that that change has broken something else. Will you please look at this thread. http://www.autohotke...221.html#250221

And prehaps implement this:

Perhaps, an simple fix (?) would be to have the forum code verify that the flash plugin is installed (enabled), and if not, revert to the old code.


Thanks for your ccnsideration.

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Thanks for the report. I've changed it from:
cl = window.clipboardData || /\d+/.exec(navigator.plugins['Shockwave Flash'].description)[0] < 10;
TO:
cl = window.clipboardData || navigator.plugins['Shockwave Flash'] && /\d+/.exec(navigator.plugins['Shockwave Flash'].description)[0] < 10;
I have tested it with Flash disabled and it seems to work now.

haichen
  • Members
  • 200 posts
  • Last active: Oct 20 2013 01:14 PM
  • Joined: 05 Feb 2007
This works also with flash10.

Frankie
  • Members
  • 2930 posts
  • Last active: Feb 05 2015 02:49 PM
  • Joined: 02 Nov 2008

This works also with flash10.

That looks like it will solve the problem with the copy button, right?
aboutscriptappsscripts
Request Video Tutorials Here or View Current Tutorials on YouTube
Any code ⇈ above ⇈ requires AutoHotkey_L to run

distressed guest
  • Guests
  • Last active:
  • Joined: --

Thanks for the report. I've changed it from:
...
I have tested it with Flash disabled and it seems to work now.

Thanks, everything is wonderful again. :D
I am no longer a distressed guest :!:

haichen
  • Members
  • 200 posts
  • Last active: Oct 20 2013 01:14 PM
  • Joined: 05 Feb 2007
forum copy test for flash10 I don't get the css selectors correct. But thats a minor problem i think. Click on the small icon next to the code box.

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
When I visit the above from a browser that doesn't have Flash installed, it produces a popup prompting to install Flash.

Other than that, I'd be interested in applying that change if someone is willing to take charge of the development and especially the testing. Perhaps the existing code.js file could be used as the foundation.

Thanks.

Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006

If security prevents other browsers or Flash from accessing the clipboard, perhaps there can be a "select all" button instead, which might then require only a control-C keystroke from the user.

I've noticed on some other phpBB forums (such as the VirtualBox forums) a "select all" link on each code box, which seems to work well. It appears to be implemented with just javascript; the function can be found in the phpBB reference: selectCode.