Changeset 683695
- Timestamp:
- 03/18/2013 02:28:05 PM (12 years ago)
- Location:
- tiny-url
- Files:
-
- 2 added
- 1 deleted
- 2 edited
- 10 copied
Legend:
- Unmodified
- Added
- Removed
-
tiny-url/tags/1.3.4/readme.txt
r682489 r683695 5 5 Requires at least: 3.0 6 6 Tested up to: 3.5.1 7 Stable tag: 1.3. 37 Stable tag: 1.3.4 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 76 76 == Changelog == 77 77 78 = 1.3.4 = 79 80 * Enqueue ZeroClipboard js files only if the copy to clipboard option is enabled. 81 * Moved inline jQuery script to a new file `ZeroClipboardMain.js` 82 78 83 = 1.3.3 = 79 84 -
tiny-url/tags/1.3.4/tiny-url.php
r682489 r683695 4 4 Plugin URI: http://www.prasannasp.net/wordpress-plugins/tiny-url/ 5 5 Description: This plugin automatically adds a tiny URL for all blog posts after post content. Uses http://tinyurl.com/ service to get Tiny URLs. 6 Version: 1.3. 36 Version: 1.3.4 7 7 Author: Prasanna SP 8 8 Author URI: http://www.prasannasp.net/ … … 84 84 85 85 function tu_load_zeroclipboard_js() { 86 $options = get_option('tinyurl_options'); 87 if ( isset($options['copy_url_button']) ) { 86 88 wp_enqueue_script('jquery-zeroclipboard', plugins_url('/js/ZeroClipboard.js', __FILE__), array('jquery')); 89 wp_enqueue_script('jquery-zeroclipboard-main', plugins_url('/js/ZeroClipboardMain.js', __FILE__), array('jquery')); 90 } 87 91 } 88 92 add_action('wp_enqueue_scripts', 'tu_load_zeroclipboard_js'); … … 93 97 ?> 94 98 <script type="text/javascript"> 95 jQuery ( function($) { 96 ZeroClipboard.setDefaults( { moviePath: '<?php echo '' .plugins_url( 'swf/ZeroClipboard.swf' , __FILE__ ). ''; ?>' } ); 97 98 /** workaround for firefox versions 18 and 19. 99 https://bugzilla.mozilla.org/show_bug.cgi?id=829557 100 https://github.com/jonrohan/ZeroClipboard/issues/73 101 http://plugins.trac.wordpress.org/browser/wp-clone-by-wp-academy/trunk/lib/view.php?rev=677374#L6 102 */ 103 var TUenableZC = true; 104 var is_firefox18 = navigator.userAgent.toLowerCase().indexOf('firefox/18') > -1; 105 var is_firefox19 = navigator.userAgent.toLowerCase().indexOf('firefox/19') > -1; 106 if (is_firefox18 || is_firefox19) TUenableZC = false; 107 108 109 $( ".tiny-url" ).each( function() { 110 var clip = new ZeroClipboard( $( "button#tiny-url-button",this ) ); 111 clip.glue( 'tiny-url-button', 'tiny-url-button-div' ); 112 /** FF 18/19 users won't see an alert box. */ 113 if (TUenableZC) { 114 clip.on( 'complete', function (client, args) { 115 alert( "Tiny URL copied to clipboard:" ); 116 }); 117 } 118 }); 119 }); 99 ZeroClipboard.setDefaults( { moviePath: '<?php echo '' .plugins_url( 'swf/ZeroClipboard.swf' , __FILE__ ). ''; ?>' } ); 120 100 </script> 121 101 <?php … … 123 103 } 124 104 125 add_action('wp_ footer', 'tu_tinyurl_copy_script');105 add_action('wp_head', 'tu_tinyurl_copy_script'); 126 106 127 107 // Set-up Action and Filter Hooks -
tiny-url/trunk/readme.txt
r682489 r683695 5 5 Requires at least: 3.0 6 6 Tested up to: 3.5.1 7 Stable tag: 1.3. 37 Stable tag: 1.3.4 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 76 76 == Changelog == 77 77 78 = 1.3.4 = 79 80 * Enqueue ZeroClipboard js files only if the copy to clipboard option is enabled. 81 * Moved inline jQuery script to a new file `ZeroClipboardMain.js` 82 78 83 = 1.3.3 = 79 84 -
tiny-url/trunk/tiny-url.php
r682489 r683695 4 4 Plugin URI: http://www.prasannasp.net/wordpress-plugins/tiny-url/ 5 5 Description: This plugin automatically adds a tiny URL for all blog posts after post content. Uses http://tinyurl.com/ service to get Tiny URLs. 6 Version: 1.3. 36 Version: 1.3.4 7 7 Author: Prasanna SP 8 8 Author URI: http://www.prasannasp.net/ … … 84 84 85 85 function tu_load_zeroclipboard_js() { 86 $options = get_option('tinyurl_options'); 87 if ( isset($options['copy_url_button']) ) { 86 88 wp_enqueue_script('jquery-zeroclipboard', plugins_url('/js/ZeroClipboard.js', __FILE__), array('jquery')); 89 wp_enqueue_script('jquery-zeroclipboard-main', plugins_url('/js/ZeroClipboardMain.js', __FILE__), array('jquery')); 90 } 87 91 } 88 92 add_action('wp_enqueue_scripts', 'tu_load_zeroclipboard_js'); … … 93 97 ?> 94 98 <script type="text/javascript"> 95 jQuery ( function($) { 96 ZeroClipboard.setDefaults( { moviePath: '<?php echo '' .plugins_url( 'swf/ZeroClipboard.swf' , __FILE__ ). ''; ?>' } ); 97 98 /** workaround for firefox versions 18 and 19. 99 https://bugzilla.mozilla.org/show_bug.cgi?id=829557 100 https://github.com/jonrohan/ZeroClipboard/issues/73 101 http://plugins.trac.wordpress.org/browser/wp-clone-by-wp-academy/trunk/lib/view.php?rev=677374#L6 102 */ 103 var TUenableZC = true; 104 var is_firefox18 = navigator.userAgent.toLowerCase().indexOf('firefox/18') > -1; 105 var is_firefox19 = navigator.userAgent.toLowerCase().indexOf('firefox/19') > -1; 106 if (is_firefox18 || is_firefox19) TUenableZC = false; 107 108 109 $( ".tiny-url" ).each( function() { 110 var clip = new ZeroClipboard( $( "button#tiny-url-button",this ) ); 111 clip.glue( 'tiny-url-button', 'tiny-url-button-div' ); 112 /** FF 18/19 users won't see an alert box. */ 113 if (TUenableZC) { 114 clip.on( 'complete', function (client, args) { 115 alert( "Tiny URL copied to clipboard:" ); 116 }); 117 } 118 }); 119 }); 99 ZeroClipboard.setDefaults( { moviePath: '<?php echo '' .plugins_url( 'swf/ZeroClipboard.swf' , __FILE__ ). ''; ?>' } ); 120 100 </script> 121 101 <?php … … 123 103 } 124 104 125 add_action('wp_ footer', 'tu_tinyurl_copy_script');105 add_action('wp_head', 'tu_tinyurl_copy_script'); 126 106 127 107 // Set-up Action and Filter Hooks
Note: See TracChangeset
for help on using the changeset viewer.