Changeset 640433
- Timestamp:
- 12/17/2012 10:07:07 AM (13 years ago)
- Location:
- noprofeedorg/trunk
- Files:
-
- 1 deleted
- 13 edited
-
. (modified) (1 prop)
-
class.noprofeed.php (modified) (2 diffs)
-
inc/mc/inc/jquery-1.4.2.min.js (deleted)
-
inc/myEASYcom.php (modified) (20 diffs)
-
js/myeasywp.js (modified) (1 diff)
-
js/npf-rating.js (modified) (1 diff)
-
js/npf-twitter.js (modified) (1 diff)
-
js/npf-wid.js (modified) (1 diff)
-
js/src/myeasywp.dev.js (modified) (2 diffs)
-
js/src/npf-rating.dev.js (modified) (1 diff)
-
js/src/npf-wid.dev.js (modified) (29 diffs)
-
noprofeed-override.css (modified) (1 diff)
-
noprofeed.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
noprofeedorg/trunk
-
Property
svn:ignore
set to
TODO.txt
-
Property
svn:ignore
set to
-
noprofeedorg/trunk/class.noprofeed.php
r465976 r640433 208 208 .'<p>noprofeed.org — ' 209 209 . __( 'the widget style customization file is missing or not writeable!', NOPROFEED_LOCALE ) 210 . '<br /><br />'. __( 'Please set 666 permissions on this file:', NOPROFEED_LOCALE ) 211 . '<br />'. str_replace( ABSPATH, '', NOPROFEED_CSS_OVERRIDE_FILE ) 210 212 .'</p>' 211 213 .'<p><a href="http://noprofeed.org/faq" target="_blank" style="color:#ffffff;">' … … 1305 1307 /* 1.0.1: BEG */ 1306 1308 // $html .= strip_tags($value['content'], '<br><p>'); 1307 1309 1308 1310 $tmp = explode(' ', strip_tags($value['content'], '<br><p>')); 1309 1311 -
noprofeedorg/trunk/inc/myEASYcom.php
r414440 r640433 3 3 * myEASYcom.php: common functions for the myEASYwp plugins serie 4 4 * 5 * Version: 1.7 - 17 December 2012 6 * Version: 1.6 - 16 May 2012 7 * Version: 1.5 - 1 May 2012 8 * Version: 1.4 - 26 January 2012 5 9 * Version: 1.3 - 23 July 2011 10 * 6 11 * Author: Ugo Grandolini aka "Camaleo" 7 12 * Support site: http://myeasywp.com 8 13 * 9 * Copyright (C) 2010 Ugo Grandolini (email : [email protected])14 * Copyright (C) 2010,2013 Ugo Grandolini (email : [email protected]) 10 15 */ 11 16 … … 13 18 14 19 # DEBUG 15 #define('MYEASYWP_DOMAIN', 'myeasywp.lan');20 //define('MYEASYWP_DOMAIN', 'myeasywp.lan'); 16 21 17 22 # PRODUCTION … … 20 25 define('MYEASYWP_PATH', ''); 21 26 # TODO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 22 23 27 24 28 if(!function_exists('measycom_camaleo_links')) { … … 39 43 $admin_email = $current_user->user_email; // 1.1.3 40 44 } 41 /* 42 echo '<div align="right" style="margin:12px 0 0 0;">' 43 .'<form method="post" action="http://feedmailpro.com/account/subscribers">' 44 .'<img style="margin-right:8px;" src="http://myeasywp.com/common/img/camaleo.gif" align="absmiddle" /> ' 45 46 .'<a href="http://myeasywp.com" target="_blank">myeasywp.com: '._('myEASY Series official site').'</a>' 47 // 1.0.2: BEG 48 // .' | ' 49 // .'<a href="http://wordpress.org/extend/plugins/profile/camaleo" target="_blank">'._('Camaleo’s plugins page at WordPress.org').'</a>' 50 .' | ' 51 ._('Be the first to know what\'s going on! Subscribe our newsletter now:') 52 .'<input name="subscriber[feed_id]" value="674" type="hidden" />' 53 .'<input name="user_credentials" value="wanWqB41oGpzAAx3-w9u" type="hidden" />' 54 .'<input name="subscriber[email]" size="15" type="text" value="'.$admin_email.'" />' 55 .' <input class="button-primary" name="commit" value="Subscribe" type="submit" />' 56 .'</form>' 57 // 1.0.2: END 58 .'</div>' 59 ; 60 */ 45 61 46 ?><div align="right" style="margin:12px 0 0 0;"> 62 47 <span id="mc-response"><?php 63 48 64 require_once( 'mc/inc/store-address.php');49 require_once( 'mc/inc/store-address.php' ); 65 50 if($_GET['submit']) { 66 51 … … 70 55 ?></span> 71 56 <form id="signup" action="" method="get"> 72 <img style="margin-right:8px;" src="http://myeasywp.com/common/img/camaleo.gif" align="absmiddle" /> 73 <a href="http://myeasywp.com" target="_blank">myeasywp.com: <?php _e('myEASY Series official site'); ?></a> | <?php 74 75 _e('Be the first to know what\'s going on! Join Our Mailing List:'); 76 77 ?><input type="text" name="email" id="email" value="<?php echo $admin_email; ?>" /> 78 <div style="margin:-10px 0 10px 0;"> 57 <div style="margin:-10px 20px 10px 0;border:0px dotted red;"> 79 58 <div style="float:right;margin:12px 0 4px 20px;"> 80 <input class="button-primary" name="commit" value="Join" type="submit" /> 81 </div> 82 <div style="float:right;margin:10px 0 0 0;"> 83 <a href="http://services.myeasywp.com/?page=privacy" target="_blank"><?php 59 <img style="margin-right:8px;" src="http://myeasywp.com/common/img/camaleo.gif" align="absmiddle" /> 60 <a href="http://myeasywp.com" target="_blank">myeasywp.com: <?php _e('myEASY Series official site'); ?></a> | <?php 61 62 _e('Be the first to know what\'s going on! Join Our Mailing List:'); 63 64 ?><input type="text" name="email" id="email" value="<?php echo $admin_email; ?>" /> 65 <input class="button-primary" name="commit" value="Join" type="submit" /><br /> 66 <a href="http://myeasywp.com/privacy" target="_blank"><?php 84 67 _e('Your privacy is critically important to us!'); ?> 85 68 </a> 86 69 </div> 70 <div style="clear:both;"></div> 87 71 </div> 88 72 </form> 89 <script type="text/javascript">var myeasyplugin = '<?php echo myEASYcomCaller; ?>';</script> 90 91 <script type="text/javascript" src="<?php echo plugins_url() . $myeasycom_pluginname . 'inc/mc/inc/'; ?>jquery-1.4.2.min.js"></script> 92 <!-- <script type="text/javascript" src="<?php echo plugins_url() . $myeasycom_pluginname . 'inc/mc/inc/'; ?>mailing-list.js"></script> --> 93 <script type="text/javascript" src="<?php echo plugins_url() . $myeasycom_pluginname . 'js/'; ?>myeasywp.js"></script> 73 <script type="text/javascript">var myeasyplugin='<?php echo myEASYcomCaller; ?>';</script> 74 <script type="text/javascript" src="<?php echo plugins_url() . $myeasycom_pluginname .'js/'; ?>myeasywp.js"></script> 94 75 <?php 95 76 } … … 133 114 * display the advertisment stuff 134 115 */ 135 $html = measycom_get_adcontents('/service/myads-1.1.php?p='.$ref_code.'&u='.$_SERVER['SERVER_NAME']); 116 // $html = measycom_get_adcontents('/service/myads-1.1.php?p='.$ref_code.'&u='.$_SERVER['SERVER_NAME']); 117 $html = measycom_get_adcontents('/service/ad-'. $ref_code .'.html'); 136 118 137 119 echo '<div style="width:auto;height:auto;background:transparent;padding:0;margin:8px 0 0 0;">' 138 .$html 120 . $html 121 . '</div>' 122 ; 123 } 124 } 125 126 if(!function_exists('measycom_pro_stats')) { 127 128 /** 129 * @since 1.2.1 130 */ 131 function measycom_pro_stats($ref_code) { 132 133 /** 134 * log usage statistic 135 */ 136 // measycom_get_adcontents('/service/myads-1.1.php?p='.$ref_code.'&u='.$_SERVER['SERVER_NAME'], true); 137 measycom_get_adcontents('/service/ad-'. $ref_code .'.html', true); 138 //echo measycom_get_adcontents('/service/myads-1.1.php?p='.$ref_code.'&u='.$_SERVER['SERVER_NAME']); 139 } 140 } 141 142 if(!function_exists('measycom_donate')) { 143 144 function measycom_donate($ref_code) { 145 146 /** 147 * display the donation stuff 148 */ 149 $html = measycom_get_adcontents('/service/myads-1.1.php?p=donate&d='. $ref_code .'&u='. $_SERVER['SERVER_NAME']); 150 151 echo '<div style="width:auto;height:auto;background:transparent;padding:0;margin:8px 0 0 0;">' 152 . $html 139 153 .'</div>' 140 154 ; … … 142 156 } 143 157 144 if(!function_exists('measycom_pro_stats')) {145 146 /**147 * @since 1.2.1148 */149 function measycom_pro_stats($ref_code) {150 151 /**152 * log usage statistic153 */154 measycom_get_adcontents('/service/myads-1.1.php?p='.$ref_code.'&u='.$_SERVER['SERVER_NAME'], true);155 //echo measycom_get_adcontents('/service/myads-1.1.php?p='.$ref_code.'&u='.$_SERVER['SERVER_NAME']);156 }157 }158 159 if(!function_exists('measycom_donate')) {160 161 function measycom_donate($ref_code) {162 163 /**164 * display the donation stuff165 */166 $html = measycom_get_adcontents('/service/myads-1.1.php?p=donate&d='.$ref_code.'&u='.$_SERVER['SERVER_NAME']);167 168 echo '<div style="width:auto;height:auto;background:transparent;padding:0;margin:8px 0 0 0;">'169 .$html170 .'</div>'171 ;172 }173 }174 175 158 if(!function_exists('measycom_get_adcontents')) { 176 159 … … 181 164 */ 182 165 $domain = MYEASYWP_DOMAIN; 183 $domain_path = MYEASYWP_PATH.$domain_path; 166 $domain_path = MYEASYWP_PATH . $domain_path; 167 168 //return $domain_path; 184 169 185 170 $html = ''; … … 192 177 * HTTP ERROR 193 178 */ 194 $html = 'Connection error measycom_get_adcontents(' . $domain_path .')';179 $html = 'Connection error measycom_get_adcontents('. $domain_path .')'; 195 180 } 196 181 else { … … 207 192 208 193 if($isSTAT==true) { 194 209 195 /** 210 196 * for stat there is no need to go further … … 232 218 fclose($fp); 233 219 } 220 234 221 return $html; 235 222 } … … 762 749 class myeasywp_news { 763 750 764 var $version = '1. 0';751 var $version = '1.1'; 765 752 766 753 var $ref_code; // caller plugin … … 774 761 * initializations 775 762 */ 776 $this->cache = ABSPATH .'wp-content/uploads/myeasywp_dashnews-'.$this->ref_code.'.txt';763 $this->cache = ABSPATH .'wp-content/uploads/myeasywp_dashnews-'. $this->ref_code .'.txt'; 777 764 778 765 $this->html = $this->fill_html(); 779 766 //echo '>>>'.$this->html.'<br>['.$this->ref_family.']<br>'; 780 767 781 if(is_dir(ABSPATH .'wp-content/uploads') && is_writable(ABSPATH.'wp-content/uploads')) {768 if(is_dir(ABSPATH . 'wp-content/uploads') && is_writable(ABSPATH . 'wp-content/uploads')) { 782 769 783 770 if(file_exists($this->cache)) { … … 800 787 } 801 788 802 add_action('wp_dashboard_setup', array($this, 'register_widget')); 789 $cache = file_get_contents($this->cache); 790 if(strlen($cache) > 0) { 791 792 add_action('wp_dashboard_setup', array($this, 'register_widget')); 793 } 803 794 } 804 795 805 796 function register_widget() { 806 797 807 wp_add_dashboard_widget('myeasywp-news', 'myEASYwp.com news', array($this, 'myeasywp_dashnews')); 798 $cache = file_get_contents($this->cache); 799 if(strlen($cache) > 0) { 800 801 wp_add_dashboard_widget('myeasywp-news', 'myEASYwp.com news', array($this, 'myeasywp_dashnews')); 802 } 808 803 } 809 804 … … 813 808 * get the html contents 814 809 */ 815 if($this->ref_family==false) { 816 817 return $this->get_data('/service/myads-1.1.php?p='.$this->ref_code.'&u='.$_SERVER['SERVER_NAME']); 810 if($this->ref_family == false) { 811 812 // return $this->get_data('/service/myads-1.1.php?p='.$this->ref_code.'&u='.$_SERVER['SERVER_NAME']); 813 return $this->get_data('/service/ad-'. $this->ref_code .'.html'); 818 814 } 819 815 else { 820 816 821 return $this->get_data('/service/myads-1.1.php?p='.$this->ref_code.'&u='.$_SERVER['SERVER_NAME'], true); 817 // return $this->get_data('/service/myads-1.1.php?p='.$this->ref_code.'&u='.$_SERVER['SERVER_NAME'], true); 818 return $this->get_data('/service/ad-'. $this->ref_code .'.html', true); 822 819 } 823 820 } … … 844 841 */ 845 842 $domain = MYEASYWP_DOMAIN; 846 $domain_path = MYEASYWP_PATH .$domain_path;843 $domain_path = MYEASYWP_PATH . $domain_path; 847 844 $html = ''; 848 845 … … 854 851 * HTTP ERROR 855 852 */ 856 $html = 'Connection error m easycom_get_adcontents(' . $domain_path . ')';853 $html = 'Connection error myeasycom_get_adcontents(' . $domain_path . ')'; 857 854 } 858 855 else { … … 894 891 fclose($fp); 895 892 } 893 894 //echo $header . '<br>'; 895 //echo $result . '<br>'; 896 //echo $html . '<br>'; 897 896 898 return $html; 897 899 } … … 909 911 } 910 912 911 echo '<div style="width:auto;height:auto;background:transparent;padding:0;margin:8px 0 0 0;">' 912 .$this->html 913 .'</div>'; 913 if(strlen($this->html) > 0) { 914 915 echo '<div style="width:auto;height:auto;background:transparent;padding:0;margin:8px 0 0 0;">' 916 . $this->html 917 .'</div>'; 918 } 914 919 } 915 920 } … … 1370 1375 ## new wp_plugin_donation_to_camaleo(); 1371 1376 } 1372 ?> 1377 1378 if(!class_exists('myEASYnotifier')) { 1379 1380 class myEASYnotifier { 1381 1382 /** 1383 * to be only executed in the backend: admininstration 1384 * notification system adapted from a Joao Araujo work ~ http://twitter.com/unispheredesign 1385 * 1386 * call as follow: 1387 * 1388 * $PLUGIN_notifier = new myEASYnotifier(); 1389 * 1390 * $PLUGIN_notifier->version = PLUGIN_VERSION; 1391 * $PLUGIN_notifier->plugin_name = PLUGIN_PLUGINNAME; 1392 * $PLUGIN_notifier->plugin_id = PLUGIN_PLUGINID; 1393 * $PLUGIN_notifier->folder_name = PLUGIN_FOLDER; 1394 * $PLUGIN_notifier->plugin_notifier = PLUGIN_NOTIFIER; 1395 * $PLUGIN_notifier->version = '0.0.0'; // todo | debug 1396 * $PLUGIN_notifier->notifier_cache_interval = 0; // todo | debug 1397 * 1398 * $PLUGIN_notifier->__init(); 1399 * 1400 */ 1401 1402 // Default values 1403 var $version = '0.0.1'; 1404 var $plugin_name = 'plugin-name'; 1405 var $plugin_id = 0; 1406 var $folder_name = 'folder-name'; 1407 var $plugin_notifier = 'notifier-name'; 1408 1409 // The time interval for the remote XML cache in the database 1410 var $notifier_cache_interval = 21600; // default to 6 hours 1411 1412 // Where to get the remote notifier XML file containing the latest version of the plugin and changelog 1413 var $notifier_xml_url = 'http://myeasywp.altervista.org/'; 1414 1415 function __init() { 1416 1417 add_action('admin_menu', array($this, 'update_notifier_menu')); 1418 1419 // todo ------------ 1420 /* add_action('admin_bar_menu', array($this, 'update_notifier_bar_menu', 1000)); */ 1421 add_action('admin_bar_menu', array($this, 'update_notifier_bar_menu')); 1422 // todo ------------ 1423 } 1424 1425 // Adds an update notification to the WordPress Dashboard menu 1426 function update_notifier_menu() { 1427 1428 // Stop if simplexml_load_string funtion isn't available 1429 if(function_exists('simplexml_load_string')) { 1430 1431 // Get the latest remote XML file on our server 1432 $xml = $this->get_latest_theme_version($this->notifier_cache_interval); 1433 1434 /************** 1435 * Read theme current version from the style.css 1436 * $theme_data = get_theme_data(TEMPLATEPATH . '/style.css'); 1437 *************/ 1438 1439 if( ! is_object( $xml ) ) { 1440 1441 return; 1442 } 1443 1444 if( version_compare($xml->latest, $this->version, '>') ) { 1445 1446 // Compare current theme version with the remote XML version 1447 add_dashboard_page( 1448 1449 $this->plugin_name . ' Updates', 1450 $this->plugin_name . ' <span class="update-plugins count-1"><span class="update-count">1</span></span>', 1451 'administrator', 1452 'theme-update-notifier-' . $this->plugin_notifier, 1453 array($this, 'update_notifier') 1454 ); 1455 } 1456 } 1457 } 1458 1459 // Adds an update notification to the WordPress 3.1+ Admin Bar 1460 function update_notifier_bar_menu() { 1461 1462 if(function_exists('simplexml_load_string')) { 1463 1464 // Stop if simplexml_load_string funtion isn't available 1465 global $wp_admin_bar, $wpdb; 1466 1467 if( !is_super_admin() || !is_admin_bar_showing() ) { 1468 1469 // Don't display notification in admin bar if it's disabled or the current user isn't an administrator 1470 return; 1471 } 1472 1473 // Get the latest remote XML file on our server 1474 $xml = $this->get_latest_theme_version($this->notifier_cache_interval); 1475 1476 /************** 1477 * Read theme current version from the style.css 1478 * $theme_data = get_theme_data(TEMPLATEPATH . '/style.css'); 1479 *************/ 1480 1481 if( ! is_object( $xml ) ) { 1482 1483 return; 1484 } 1485 1486 if( version_compare($xml->latest, $this->version, '>') ) { 1487 1488 // Compare current theme version with the remote XML version 1489 $wp_admin_bar->add_menu( 1490 1491 array( 1492 1493 'id' => 'update_notifier-' . $this->plugin_notifier, 1494 'title' => '<span>' . $this->plugin_name . ' <span id="ab-updates">1 Update</span></span>', 1495 'href' => get_admin_url() . 'index.php?page=theme-update-notifier-' . $this->plugin_notifier 1496 ) 1497 ); 1498 } 1499 } 1500 } 1501 1502 // The notifier page 1503 function update_notifier() { 1504 1505 // Get the latest remote XML file on our server 1506 $xml = $this->get_latest_theme_version( $this->notifier_cache_interval ); 1507 1508 /************** 1509 * Read theme current version from the style.css 1510 * $theme_data = get_theme_data(TEMPLATEPATH . '/style.css'); 1511 *************/ 1512 // $theme_data['Version']; 1513 // $theme_shot = '<img style="float:left;margin:0 20px 20px 0;border:1px solid #ddd;" src="'. get_template_directory_uri() .'/screenshot.png" />'; 1514 1515 $theme_shot = '<img style="float:right;margin:0 20px 0 0;border:none;" src="http://myeasywp.com/img/update-available.jpg" />'; 1516 1517 $theme_version = $this->version; 1518 $theme_name = $this->plugin_name; 1519 $ID = $this->plugin_id; 1520 $theme_folder = $this->folder_name; 1521 1522 $latest_version = $xml->latest; 1523 1524 /** 1525 * <p><strong>Please note:</strong> make a <strong>backup</strong> of the Plugin inside your WordPress installation folder 1526 * <strong>/wp-content/plugins/{$theme_folder}/</strong>. I also encourage you to make a full backup your site and database before performing an update.</p> 1527 */ 1528 $html = <<< HTML 1529 <style>.update-nag {display:none;}</style> 1530 <div class="wrap"> 1531 <div id="icon-tools" class="icon32"></div> 1532 <h2>{$theme_name} Updates</h2> 1533 <div id="message" class="updated below-h2"> 1534 <h2> 1535 <strong>There is a new version of the {$theme_name} plugin available!</strong> 1536 <br />You are using version <strong>{$theme_version}</strong>: please update to version <strong>{$latest_version}</strong>. 1537 </h2> 1538 <div> 1539 <h3>Download and Update Instructions</h3> 1540 <p> 1541 To get the latest <strong>{$theme_name}</strong> update <a href="http://myeasywp.com/free-downloads/?id={$ID}"><strong>click here</strong></a> 1542 or visit the <a href="http://myeasywp.com/plugins/{$theme_folder}/"><strong>plugin page</strong></a> at MYEASYWP.COM, 1543 look for the <strong>download button</strong> and re-download the plugin. 1544 </p> 1545 <p> 1546 Extract the contents of the zip file and upload the <code>/{$theme_folder}</code> folder to your <code>/wp-content/plugins/</code> 1547 folder using an FTP software overwriting the old folder. 1548 </p> 1549 </div> 1550 </div> 1551 <h2 class="changelog">Changelog</h2> 1552 {$theme_shot} 1553 1554 HTML; 1555 1556 echo $html . $xml->changelog . '</div>'; 1557 } 1558 1559 // Get the remote XML file contents and return its data (Version and Changelog) 1560 // Uses the cached version if available and inside the time interval defined 1561 function get_latest_theme_version($interval) { 1562 1563 $notifier_file_url = $this->notifier_xml_url . $this->plugin_notifier . '.xml'; 1564 $db_cache_field = 'notifier-cache-' . $this->plugin_notifier; 1565 $db_cache_field_last_updated = 'notifier-cache-last-updated-' . $this->plugin_notifier; 1566 1567 $last = get_option( $db_cache_field_last_updated ); 1568 $now = time(); 1569 1570 //echo '<div class="updated" style="width:100%;padding-top:40px;">'; 1571 //echo '$db_cache_field['.$db_cache_field.']<br>'; 1572 //echo '$db_cache_field_last_updated['.$db_cache_field_last_updated.']<br>'; 1573 //echo '$notifier_file_url['.$notifier_file_url.']<br>'; 1574 //echo '$last['.$last.']<br>'; 1575 //echo '</div>'; 1576 1577 // check the cache 1578 if( !$last || (( $now - $last ) > $interval) ) { 1579 1580 // cache doesn't exist, or is old, so refresh it 1581 if( function_exists('curl_init') ) { 1582 1583 // if cURL is available, use it... 1584 $ch = curl_init($notifier_file_url); 1585 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 1586 curl_setopt($ch, CURLOPT_HEADER, 0); 1587 curl_setopt($ch, CURLOPT_TIMEOUT, 10); 1588 $cache = curl_exec($ch); 1589 curl_close($ch); 1590 } 1591 else { 1592 1593 // ...if not, use the common file_get_contents() 1594 $cache = @file_get_contents($notifier_file_url); 1595 } 1596 1597 if($cache) { 1598 1599 // we got good results 1600 update_option( $db_cache_field, $cache ); 1601 update_option( $db_cache_field_last_updated, time() ); 1602 } 1603 1604 // read from the cache file 1605 $notifier_data = get_option( $db_cache_field ); 1606 } 1607 else { 1608 1609 // cache file is fresh enough, so read from it 1610 $notifier_data = get_option( $db_cache_field ); 1611 } 1612 1613 // Let's see if the $xml data was returned as we expected it to. 1614 // If it didn't, use the default 1.0.0 as the latest version so that we don't have problems when the remote server hosting the XML file is down 1615 if( strpos((string)$notifier_data, '<notifier>') === false) { 1616 1617 $notifier_data = file_get_contents( dirname(__FILE__) . '/'. $this->plugin_name .'.xml' ); 1618 } 1619 1620 // Load the remote XML data into a variable and return it 1621 $xml = @simplexml_load_string($notifier_data); 1622 1623 return $xml; 1624 } 1625 } 1626 } -
noprofeedorg/trunk/js/myeasywp.js
r414440 r640433 1 function toggleOptions(c){var b=document.getElementById(c+"-toggler");var a=document.getElementById(c+"-contents");if(b&&a){if(a.style.display=="none"){a.style.display="block";b.className="optionsGroup-toggler-close"}else{a.style.display="none";b.className="optionsGroup-toggler-open"}}}if($){$(document).ready(function(){$("#signup").submit(function(){$("#mc-response").html("Adding email address...");$.ajax({url:location.protocol+"//"+location.hostname+"/wp-content/plugins/"+myeasyplugin+"/inc/mc/inc/store-address.php",data:"ajax=true&email="+escape($("#email").val()),success:function(a){$("#mc-response").html(a)}});return false})})}; 1 /** 2 * myeasywp.com 3 * settings 4 * 17 December 2012 5 */function toggleOptions(e){var t=document.getElementById(e+"-toggler"),n=document.getElementById(e+"-contents");if(t&&n)if(n.style.display=="none"){n.style.display="block";t.className="optionsGroup-toggler-close"}else{n.style.display="none";t.className="optionsGroup-toggler-open"}}jQuery&&jQuery(document).ready(function(){jQuery("#signup").submit(function(){jQuery("#mc-response").html("Adding email address...");jQuery.ajax({url:location.protocol+"//"+location.hostname+"/wp-content/plugins/"+myeasyplugin+"/inc/mc/inc/store-address.php",data:"ajax=true&email="+escape(jQuery("#email").val()),success:function(e){jQuery("#mc-response").html(e)}});return!1})}); -
noprofeedorg/trunk/js/npf-rating.js
r403247 r640433 1 var sMax;var holder;var preSet;var rated;function npf_WidRating(b,c){sMax=0;for(n=0;n<b.parentNode.childNodes.length;n++){if(b.parentNode.childNodes[n].nodeName=="A"){sMax++}}if(!rated){s=b.id.replace("widrate"+c+"_","");a=0;for(i=1;i<=sMax;i++){if(i<=s){document.getElementById("widrate"+c+"_"+i).className="on";document.getElementById("npf-wid-rateStatus-"+c).innerHTML=b.title;holder=a+1;a++}else{document.getElementById("widrate"+c+"_"+i).className=""}}}}function npf_WidRatingOff(b,c){if(!rated){if(!preSet){for(i=1;i<=sMax;i++){document.getElementById("widrate"+c+"_"+i).className="";document.getElementById("npf-wid-rateStatus-"+c).innerHTML=b.parentNode.title}}else{npf_WidRating(preSet);document.getElementById("npf-wid-rateStatus-"+c).innerHTML=document.getElementById("npf-wid-ratingSaved-"+c).innerHTML}}}function npf_WidRate(b,c){if(!rated){document.getElementById("npf-wid-rateStatus-"+c).innerHTML=document.getElementById("npf-wid-ratingSaved-"+c).innerHTML+" :: "+b.title;preSet=b;rated=1;npf_WidRatingSendRate(b,c);npf_WidRating(b,c)}}function npf_WidRatingSendRate(b){alert("Your rating was: "+b.title+"\n\nAJAX code to be implemented!")}function npf_setActualRating(c,d){for(var b=1;b<=c;b++){npf_WidRating(document.getElementById("widrate"+d+"_"+b),d)}}; 1 /** 2 * Author: Addam M. Driver 3 * Date: 10/31/2006 4 * http://www.reignwaterdesigns.com/ad/tidbits/rateme/ 5 * 6 * adapted to be used at noprofeed.org 7 * 2011 8 */function npf_WidRating(e,t){sMax=0;for(n=0;n<e.parentNode.childNodes.length;n++)e.parentNode.childNodes[n].nodeName=="A"&&sMax++;if(!rated){s=e.id.replace("widrate"+t+"_","");a=0;for(i=1;i<=sMax;i++)if(i<=s){document.getElementById("widrate"+t+"_"+i).className="on";document.getElementById("npf-wid-rateStatus-"+t).innerHTML=e.title;holder=a+1;a++}else document.getElementById("widrate"+t+"_"+i).className=""}}function npf_WidRatingOff(e,t){if(!rated)if(!preSet)for(i=1;i<=sMax;i++){document.getElementById("widrate"+t+"_"+i).className="";document.getElementById("npf-wid-rateStatus-"+t).innerHTML=e.parentNode.title}else{npf_WidRating(preSet);document.getElementById("npf-wid-rateStatus-"+t).innerHTML=document.getElementById("npf-wid-ratingSaved-"+t).innerHTML}}function npf_WidRate(e,t){if(!rated){document.getElementById("npf-wid-rateStatus-"+t).innerHTML=document.getElementById("npf-wid-ratingSaved-"+t).innerHTML+" :: "+e.title;preSet=e;rated=1;npf_WidRatingSendRate(e,t);npf_WidRating(e,t)}}function npf_WidRatingSendRate(e){alert("Your rating was: "+e.title+"\n\nAJAX code to be implemented!")}function npf_setActualRating(e,t){for(var n=1;n<=e;n++)npf_WidRating(document.getElementById("widrate"+t+"_"+n),t)}var sMax,holder,preSet,rated; -
noprofeedorg/trunk/js/npf-twitter.js
r414127 r640433 1 TWTR=window.TWTR||{};if(!Array.forEach){Array.prototype.filter=function(f,g){var e=g||window;var b=[];for(var d=0,c=this.length;d<c;++d){if(!f.call(e,this[d],d,this)){continue}b.push(this[d])}return b};Array.prototype.indexOf=function(b,c){var c=c||0;for(var a=0;a<this.length;++a){if(this[a]===b){return a}}return -1}}(function(){if(TWTR&&TWTR.Widget){return}function f(l,o,k){for(var n=0,m=l.length;n<m;++n){o.call(k||window,l[n],n,l)}}function b(i,k,j){this.el=i;this.prop=k;this.from=j.from;this.to=j.to;this.time=j.time;this.callback=j.callback;this.animDiff=this.to-this.from}b.canTransition=function(){var i=document.createElement("twitter");i.style.cssText="-webkit-transition: all .5s linear;";return !!i.style.webkitTransitionProperty}();b.prototype._setStyle=function(i){switch(this.prop){case"opacity":this.el.style[this.prop]=i;this.el.style.filter="alpha(opacity="+i*100+")";break;default:this.el.style[this.prop]=i+"px";break}};b.prototype._animate=function(){var i=this;this.now=new Date();this.diff=this.now-this.startTime;if(this.diff>this.time){this._setStyle(this.to);if(this.callback){this.callback.call(this)}clearInterval(this.timer);return}this.percentage=(Math.floor((this.diff/this.time)*100)/100);this.val=(this.animDiff*this.percentage)+this.from;this._setStyle(this.val)};b.prototype.start=function(){var i=this;this.startTime=new Date();this.timer=setInterval(function(){i._animate.call(i)},15)};TWTR.Widget=function(i){this.init(i)};(function(){var x={};var u=location.protocol.match(/https/);var w=/^.+\/profile_images/;var C="https://s3.amazonaws.com/twitter_production/profile_images";var D=function(N){return u?N.replace(w,C):N};var M={};var K=function(O){var N=M[O];if(!N){N=new RegExp("(?:^|\\s+)"+O+"(?:\\s+|$)");M[O]=N}return N};var j=function(R,V,S,T){var V=V||"*";var S=S||document;var O=[],N=S.getElementsByTagName(V),U=K(R);for(var P=0,Q=N.length;P<Q;++P){if(U.test(N[P].className)){O[O.length]=N[P];if(T){T.call(N[P],N[P])}}}return O};var L=function(){var N=navigator.userAgent;return{ie:N.match(/MSIE\s([^;]*)/)}}();var n=function(N){if(typeof N=="string"){return document.getElementById(N)}return N};var F=function(N){return N.replace(/^\s+|\s+$/g,"")};var B=function(){var N=self.innerHeight;var O=document.compatMode;if((O||L.ie)){N=(O=="CSS1Compat")?document.documentElement.clientHeight:document.body.clientHeight}return N};var J=function(P,N){var O=P.target||P.srcElement;return N(O)};var z=function(O){try{if(O&&3==O.nodeType){return O.parentNode}else{return O}}catch(N){}};var A=function(O){var N=O.relatedTarget;if(!N){if(O.type=="mouseout"){N=O.toElement}else{if(O.type=="mouseover"){N=O.fromElement}}}return z(N)};var G=function(O,N){N.parentNode.insertBefore(O,N.nextSibling)};var H=function(O){try{O.parentNode.removeChild(O)}catch(N){}};var E=function(N){return N.firstChild};var i=function(P){var O=A(P);while(O&&O!=this){try{O=O.parentNode}catch(N){O=this}}if(O!=this){return true}return false};var m=function(){if(document.defaultView&&document.defaultView.getComputedStyle){return function(O,R){var Q=null;var P=document.defaultView.getComputedStyle(O,"");if(P){Q=P[R]}var N=O.style[R]||Q;return N}}else{if(document.documentElement.currentStyle&&L.ie){return function(N,P){var O=N.currentStyle?N.currentStyle[P]:null;return(N.style[P]||O)}}}}();var I={has:function(N,O){return new RegExp("(^|\\s)"+O+"(\\s|$)").test(n(N).className)},add:function(N,O){if(!this.has(N,O)){n(N).className=F(n(N).className)+" "+O}},remove:function(N,O){if(this.has(N,O)){n(N).className=n(N).className.replace(new RegExp("(^|\\s)"+O+"(\\s|$)","g"),"")}}};var k={add:function(P,O,N){if(P.addEventListener){P.addEventListener(O,N,false)}else{P.attachEvent("on"+O,function(){N.call(P,window.event)})}},remove:function(P,O,N){if(P.removeEventListener){P.removeEventListener(O,N,false)}else{P.detachEvent("on"+O,N)}}};var t=function(){function O(Q){return parseInt((Q).substring(0,2),16)}function N(Q){return parseInt((Q).substring(2,4),16)}function P(Q){return parseInt((Q).substring(4,6),16)}return function(Q){return[O(Q),N(Q),P(Q)]}}();var o={bool:function(N){return typeof N==="boolean"},def:function(N){return !(typeof N==="undefined")},number:function(N){return typeof N==="number"&&isFinite(N)},string:function(N){return typeof N==="string"},fn:function(N){return typeof N==="function"},array:function(N){if(N){return o.number(N.length)&&o.fn(N.splice)}return false}};var s=["January","February","March","April","May","June","July","August","September","October","November","December"];var y=function(Q){var T=new Date(Q);if(L.ie){T=Date.parse(Q.replace(/( \+)/," UTC$1"))}var O="";var N=function(){var U=T.getHours();if(U>0&&U<13){O="am";return U}else{if(U<1){O="am";return 12}else{O="pm";return U-12}}}();var P=T.getMinutes();var S=T.getSeconds();function R(){var U=new Date();if(U.getDate()!=T.getDate()||U.getYear()!=T.getYear()||U.getMonth()!=T.getMonth()){return" - "+s[T.getMonth()]+" "+T.getDate()+", "+T.getFullYear()}else{return""}}return N+":"+P+O+R()};var q=function(T){var V=new Date();var R=new Date(T);if(L.ie){R=Date.parse(T.replace(/( \+)/," UTC$1"))}var U=V-R;var O=1000,P=O*60,Q=P*60,S=Q*24,N=S*7;if(isNaN(U)||U<0){return""}if(U<O*2){return"right now"}if(U<P){return Math.floor(U/O)+" seconds ago"}if(U<P*2){return"about 1 minute ago"}if(U<Q){return Math.floor(U/P)+" minutes ago"}if(U<Q*2){return"about 1 hour ago"}if(U<S){return Math.floor(U/Q)+" hours ago"}if(U>S&&U<S*2){return"yesterday"}if(U<S*365){return Math.floor(U/S)+" days ago"}else{return"over a year ago"}};var l={link:function(N){return N.replace(/\b(((https*\:\/\/)|www\.)[^\"\']+?)(([!?,.\)]+)?(\s|$))/g,function(T,S,Q,P,O){var R=Q.match(/w/)?"http://":"";return'<a class="twtr-hyperlink" target="_blank" href="'+R+S+'">'+((S.length>25)?S.substr(0,24)+"...":S)+"</a>"+O})},at:function(N){return N.replace(/\B[@@]([a-zA-Z0-9_]{1,20})/g,function(O,P){return'@<a target="_blank" class="twtr-atreply" href="http://twitter.com/intent/user?screen_name='+P+'">'+P+"</a>"})},list:function(N){return N.replace(/\B[@@]([a-zA-Z0-9_]{1,20}\/\w+)/g,function(O,P){return'@<a target="_blank" class="twtr-atreply" href="http://twitter.com/'+P+'">'+P+"</a>"})},hash:function(N){return N.replace(/(^|\s+)#(\w+)/gi,function(O,P,Q){return P+'<a target="_blank" class="twtr-hashtag" href="http://twitter.com/search?q=%23'+Q+'">#'+Q+"</a>"})},clean:function(N){return this.hash(this.at(this.list(this.link(N))))}};function v(O,P,N){this.job=O;this.decayFn=P;this.interval=N;this.decayRate=1;this.decayMultiplier=1.25;this.maxDecayTime=3*60*1000}v.prototype={start:function(){this.stop().run();return this},stop:function(){if(this.worker){window.clearTimeout(this.worker)}return this},run:function(){var N=this;this.job(function(){N.decayRate=N.decayFn()?Math.max(1,N.decayRate/N.decayMultiplier):N.decayRate*N.decayMultiplier;var O=N.interval*N.decayRate;O=(O>=N.maxDecayTime)?N.maxDecayTime:O;O=Math.floor(O);N.worker=window.setTimeout(function(){N.run.call(N)},O)})},destroy:function(){this.stop();this.decayRate=1;return this}};function p(O,N,P){this.time=O||6000;this.loop=N||false;this.repeated=0;this.callback=P;this.haystack=[]}p.prototype={set:function(N){this.haystack=N},add:function(N){this.haystack.unshift(N)},start:function(){if(this.timer){return this}this._job();var N=this;this.timer=setInterval(function(){N._job.call(N)},this.time);return this},stop:function(){if(this.timer){window.clearInterval(this.timer);this.timer=null}return this},_next:function(){var N=this.haystack.shift();if(N&&this.loop){this.haystack.push(N)}return N||null},_job:function(){var N=this._next();if(N){this.callback(N)}return this}};function r(P){function N(){if(P.needle.metadata&&P.needle.metadata.result_type&&P.needle.metadata.result_type=="popular"){return'<span class="twtr-popular">'+P.needle.metadata.recent_retweets+"+ recent retweets</span>"}else{return""}}var O='<div class="twtr-tweet-wrap"> <div class="twtr-avatar"> <div class="twtr-img"><a target="_blank" href="http://twitter.com/intent/user?screen_name='+P.user+'"><img alt="'+P.user+' profile" src="'+D(P.avatar)+'"></a></div> </div> <div class="twtr-tweet-text"> <p> <a target="_blank" href="http://twitter.com/intent/user?screen_name='+P.user+'" class="twtr-user">'+P.user+"</a> "+P.tweet+' <em> <a target="_blank" class="twtr-timestamp" time="'+P.timestamp+'" href="http://twitter.com/'+P.user+"/status/"+P.id+'">'+P.created_at+'</a> · <a target="_blank" class="twtr-reply" href="http://twitter.com/intent/tweet?in_reply_to='+P.id+'">reply</a> · <a target="_blank" class="twtr-rt" href="http://twitter.com/intent/retweet?tweet_id='+P.id+'">retweet</a> · <a target="_blank" class="twtr-fav" href="http://twitter.com/intent/favorite?tweet_id='+P.id+'">favorite</a> </em> '+N()+" </p> </div> </div>";var Q=document.createElement("div");Q.id="tweet-id-"+ ++r._tweetCount;Q.className="twtr-tweet";Q.innerHTML=O;this.element=Q}r._tweetCount=0;x.loadStyleSheet=function(P,O){if(!TWTR.Widget.loadingStyleSheet){TWTR.Widget.loadingStyleSheet=true;var N=document.createElement("link");N.href=P;N.rel="stylesheet";N.type="text/css";document.getElementsByTagName("head")[0].appendChild(N);var Q=setInterval(function(){var R=m(O,"position");if(R=="relative"){clearInterval(Q);Q=null;TWTR.Widget.hasLoadedStyleSheet=true}},50)}};(function(){var N=false;x.css=function(Q){var P=document.createElement("style");P.type="text/css";if(L.ie){P.styleSheet.cssText=Q}else{var R=document.createDocumentFragment();R.appendChild(document.createTextNode(Q));P.appendChild(R)}function O(){document.getElementsByTagName("head")[0].appendChild(P)}if(!L.ie||N){O()}else{window.attachEvent("onload",function(){N=true;O()})}}})();TWTR.Widget.isLoaded=false;TWTR.Widget.loadingStyleSheet=false;TWTR.Widget.hasLoadedStyleSheet=false;TWTR.Widget.WIDGET_NUMBER=0;TWTR.Widget.matches={mentions:/^@[a-zA-Z0-9_]{1,20}\b/,any_mentions:/\b@[a-zA-Z0-9_]{1,20}\b/};TWTR.Widget.jsonP=function(O,Q){var N=document.createElement("script");var P=document.getElementsByTagName("head")[0];N.type="text/javascript";N.src=O;P.insertBefore(N,P.firstChild);Q(N);return N};TWTR.Widget.prototype=function(){var Q=u?"https://":"http://";var T=window.location.hostname.match(/twitter\.com/)?(window.location.hostname+":"+window.location.port):"twitter.com";var S=Q+"search."+T+"/search.";var U=Q+"api."+T+"/1/statuses/user_timeline.";var P=Q+T+"/favorites/";var R=Q+"api."+T+"/1/";var O=25000;var N=u?"https://twitter-widgets.s3.amazonaws.com/j/1/default.gif":"http://widgets.twimg.com/j/1/default.gif";return{init:function(W){var V=this;this._widgetNumber=++TWTR.Widget.WIDGET_NUMBER;TWTR.Widget["receiveCallback_"+this._widgetNumber]=function(X){V._prePlay.call(V,X)};this._cb="TWTR.Widget.receiveCallback_"+this._widgetNumber;this.opts=W;this._base=S;this._isRunning=false;this._hasOfficiallyStarted=false;this._hasNewSearchResults=false;this._rendered=false;this._profileImage=false;this._isCreator=!!W.creator;this._setWidgetType(W.type);this.timesRequested=0;this.runOnce=false;this.newResults=false;this.results=[];this.jsonMaxRequestTimeOut=19000;this.showedResults=[];this.sinceId=1;this.source="TWITTERINC_WIDGET";this.id=W.id||"twtr-widget-"+this._widgetNumber;this.tweets=0;this.setDimensions(W.width,W.height);this.interval=W.interval||6000;this.format="json";this.rpp=W.rpp||50;this.subject=W.subject||"";this.title=W.title||"";this.setFooterText(W.footer);this.setSearch(W.search);this._setUrl();this.theme=W.theme?W.theme:this._getDefaultTheme();if(!W.id){document.write('<div class="twtr-widget" id="'+this.id+'"></div>')}this.widgetEl=n(this.id);if(W.id){I.add(this.widgetEl,"twtr-widget")}if(W.version>=2&&!TWTR.Widget.hasLoadedStyleSheet){x.loadStyleSheet("/wp-content/plugins/noprofeedorg/css/npf-twitter.css",this.widgetEl)}this.occasionalJob=new v(function(X){V.decay=X;V._getResults.call(V)},function(){return V._decayDecider.call(V)},O);this._ready=o.fn(W.ready)?W.ready:function(){};this._isRelativeTime=true;this._tweetFilter=false;this._avatars=true;this._isFullScreen=false;this._isLive=true;this._isScroll=false;this._loop=true;this._showTopTweets=(this._isSearchWidget)?true:false;this._behavior="default";this.setFeatures(this.opts.features);this.intervalJob=new p(this.interval,this._loop,function(X){V._normalizeTweet(X)});return this},setDimensions:function(V,W){this.wh=(V&&W)?[V,W]:[250,300];if(V=="auto"||V=="100%"){this.wh[0]="100%"}else{this.wh[0]=((this.wh[0]<150)?150:this.wh[0])+"px"}this.wh[1]=((this.wh[1]<100)?100:this.wh[1])+"px";return this},setRpp:function(V){var V=parseInt(V);this.rpp=(o.number(V)&&(V>0&&V<=100))?V:30;return this},_setWidgetType:function(V){this._isSearchWidget=false,this._isProfileWidget=false,this._isFavsWidget=false,this._isListWidget=false;switch(V){case"profile":this._isProfileWidget=true;break;case"search":this._isSearchWidget=true,this.search=this.opts.search;break;case"faves":case"favs":this._isFavsWidget=true;break;case"list":case"lists":this._isListWidget=true;break}return this},setFeatures:function(W){if(W){if(o.def(W.filters)){this._tweetFilter=W.filters}if(o.def(W.dateformat)){this._isRelativeTime=!!(W.dateformat!=="absolute")}if(o.def(W.fullscreen)&&o.bool(W.fullscreen)){if(W.fullscreen){this._isFullScreen=true;this.wh[0]="100%";this.wh[1]=(B()-90)+"px";var X=this;k.add(window,"resize",function(aa){X.wh[1]=B();X._fullScreenResize()})}}if(o.def(W.loop)&&o.bool(W.loop)){this._loop=W.loop}if(o.def(W.behavior)&&o.string(W.behavior)){switch(W.behavior){case"all":this._behavior="all";break;case"preloaded":this._behavior="preloaded";break;default:this._behavior="default";break}}if(o.def(W.toptweets)&&o.bool(W.toptweets)){this._showTopTweets=W.toptweets;var V=(this._showTopTweets)?"inline-block":"none";x.css("#"+this.id+" .twtr-popular { display: "+V+"; }")}if(!o.def(W.toptweets)){this._showTopTweets=true;var V=(this._showTopTweets)?"inline-block":"none";x.css("#"+this.id+" .twtr-popular { display: "+V+"; }")}if(o.def(W.avatars)&&o.bool(W.avatars)){if(!W.avatars){x.css("#"+this.id+" .twtr-avatar, #"+this.id+" .twtr-user { display: none; } #"+this.id+" .twtr-tweet-text { margin-left: 0; }");this._avatars=false}else{var Y=(this._isFullScreen)?"90px":"40px";x.css("#"+this.id+" .twtr-avatar { display: block; } #"+this.id+" .twtr-user { display: inline; } #"+this.id+" .twtr-tweet-text { margin-left: "+Y+"; }");this._avatars=true}}else{if(this._isProfileWidget){this.setFeatures({avatars:false});this._avatars=false}else{this.setFeatures({avatars:true});this._avatars=true}}if(o.def(W.hashtags)&&o.bool(W.hashtags)){(!W.hashtags)?x.css("#"+this.id+" a.twtr-hashtag { display: none; }"):""}if(o.def(W.timestamp)&&o.bool(W.timestamp)){var Z=W.timestamp?"block":"none";x.css("#"+this.id+" em { display: "+Z+"; }")}if(o.def(W.live)&&o.bool(W.live)){this._isLive=W.live}if(o.def(W.scrollbar)&&o.bool(W.scrollbar)){this._isScroll=W.scrollbar}}else{if(this._isProfileWidget){this.setFeatures({avatars:false});this._avatars=false}if(this._isProfileWidget||this._isFavsWidget){this.setFeatures({behavior:"all"})}}return this},_fullScreenResize:function(){var V=j("twtr-timeline","div",document.body,function(W){W.style.height=(B()-90)+"px"})},setTweetInterval:function(V){this.interval=V;return this},setBase:function(V){this._base=V;return this},setUser:function(W,V){this.username=W;this.realname=V||" ";if(this._isFavsWidget){this.setBase(P+W+".")}else{if(this._isProfileWidget){this.setBase(U+this.format+"?screen_name="+W)}}this.setSearch(" ");return this},setList:function(W,V){this.listslug=V.replace(/ /g,"-").toLowerCase();this.username=W;this.setBase(R+W+"/lists/"+this.listslug+"/statuses.");this.setSearch(" ");return this},setProfileImage:function(V){this._profileImage=V;this.byClass("twtr-profile-img","img").src=D(V);this.byClass("twtr-profile-img-anchor","a").href="http://twitter.com/intent/user?screen_name="+this.username;return this},setTitle:function(V){this.title=V;this.widgetEl.getElementsByTagName("h3")[0].innerHTML=this.title;return this},setCaption:function(V){this.subject=V;this.widgetEl.getElementsByTagName("h4")[0].innerHTML=this.subject;return this},setFooterText:function(V){this.footerText=(o.def(V)&&o.string(V))?V:"Join the conversation";if(this._rendered){this.byClass("twtr-join-conv","a").innerHTML=this.footerText}return this},setSearch:function(W){this.searchString=W||"";this.search=encodeURIComponent(this.searchString);this._setUrl();if(this._rendered){var V=this.byClass("twtr-join-conv","a");V.href="http://twitter.com/"+this._getWidgetPath()}return this},_getWidgetPath:function(){if(this._isProfileWidget){return this.username}else{if(this._isFavsWidget){return this.username+"/favorites"}else{if(this._isListWidget){return this.username+"/lists/"+this.listslug}else{return"#search?q="+this.search}}}},_setUrl:function(){var W=this;function V(){return"&"+(+new Date)+"=cachebust"}function X(){return(W.sinceId==1)?"":"&since_id="+W.sinceId+"&refresh=true"}if(this._isProfileWidget){this.url=this._base+"&callback="+this._cb+"&include_rts=true&count="+this.rpp+X()+"&clientsource="+this.source}else{if(this._isFavsWidget||this._isListWidget){this.url=this._base+this.format+"?callback="+this._cb+X()+"&include_rts=true&clientsource="+this.source}else{this.url=this._base+this.format+"?q="+this.search+"&include_rts=true&callback="+this._cb+"&rpp="+this.rpp+X()+"&clientsource="+this.source;if(!this.runOnce){this.url+="&result_type=mixed"}}}this.url+=V();return this},_getRGB:function(V){return t(V.substring(1,7))},setTheme:function(aa,V){var Y=this;var W=" !important";var Z=((window.location.hostname.match(/twitter\.com/))&&(window.location.pathname.match(/goodies/)));if(V||Z){W=""}this.theme={shell:{background:function(){return aa.shell.background||Y._getDefaultTheme().shell.background}(),color:function(){return aa.shell.color||Y._getDefaultTheme().shell.color}()},tweets:{background:function(){return aa.tweets.background||Y._getDefaultTheme().tweets.background}(),color:function(){return aa.tweets.color||Y._getDefaultTheme().tweets.color}(),links:function(){return aa.tweets.links||Y._getDefaultTheme().tweets.links}()}};var X="#"+this.id+" .twtr-doc, #"+this.id+" .twtr-hd a, #"+this.id+" h3, #"+this.id+" h4, #"+this.id+" .twtr-popular { background-color: "+this.theme.shell.background+W+"; color: "+this.theme.shell.color+W+"; } #"+this.id+" .twtr-popular { color: "+this.theme.tweets.color+W+"; background-color: rgba("+this._getRGB(this.theme.shell.background)+", .3)"+W+"; } #"+this.id+" .twtr-tweet a { color: "+this.theme.tweets.links+W+"; } #"+this.id+" .twtr-bd, #"+this.id+" .twtr-timeline i a, #"+this.id+" .twtr-bd p { color: "+this.theme.tweets.color+W+"; } #"+this.id+" .twtr-new-results, #"+this.id+" .twtr-results-inner, #"+this.id+" .twtr-timeline { background: "+this.theme.tweets.background+W+"; }";if(L.ie){X+="#"+this.id+" .twtr-tweet { background: "+this.theme.tweets.background+W+"; }"}x.css(X);return this},byClass:function(Y,V,W){var X=j(Y,V,n(this.id));return(W)?X:X[0]},render:function(){var X=this;if(!TWTR.Widget.hasLoadedStyleSheet){window.setTimeout(function(){X.render.call(X)},50);return this}this.setTheme(this.theme,this._isCreator);if(this._isProfileWidget){I.add(this.widgetEl,"twtr-widget-profile")}if(this._isScroll){I.add(this.widgetEl,"twtr-scroll")}if(!this._isLive&&!this._isScroll){this.wh[1]="auto"}if(this._isSearchWidget&&this._isFullScreen){document.title="Twitter search: "+escape(this.searchString)}this.widgetEl.innerHTML=this._getWidgetHtml();var W=this.byClass("twtr-timeline","div");if(this._isLive&&!this._isFullScreen){var Y=function(Z){if(X._behavior==="all"){return}if(i.call(this,Z)){X.pause.call(X)}};var V=function(Z){if(X._behavior==="all"){return}if(i.call(this,Z)){X.resume.call(X)}};this.removeEvents=function(){k.remove(W,"mouseover",Y);k.remove(W,"mouseout",V)};k.add(W,"mouseover",Y);k.add(W,"mouseout",V)}this._rendered=true;this._ready();return this},removeEvents:function(){},_getDefaultTheme:function(){return{shell:{background:"#8ec1da",color:"#ffffff"},tweets:{background:"#ffffff",color:"#444444",links:"#1985b5"}}},_getWidgetHtml:function(){var X=this;function Z(){if(X._isProfileWidget){return'<a target="_blank" href="http://twitter.com/" class="twtr-profile-img-anchor"><img alt="profile" class="twtr-profile-img" src="'+N+'"></a> <h3 class="pippo"></h3> <h4></h4>'}else{return'<h3 class="pippo">'+X.title+"</h3><h4>"+X.subject+"</h4>"}}function W(){return X._isFullScreen?" twtr-fullscreen":""}var Y=u?"https://twitter-widgets.s3.amazonaws.com/i/widget-logo.png":"http://widgets.twimg.com/i/widget-logo.png";if(this._isFullScreen){Y="https://twitter-widgets.s3.amazonaws.com/i/widget-logo-fullscreen.png"}var V='<div class="twtr-doc'+W()+'" style="width: '+this.wh[0]+';"> <div class="twtr-hd">'+Z()+' </div> <div class="twtr-bd"> <div class="twtr-timeline" style="height: '+this.wh[1]+';"> <div class="twtr-tweets"> <div class="twtr-reference-tweet"></div> <!-- tweets show here --> </div> </div> </div> <div class="twtr-ft"> <div><a target="_blank" href="http://twitter.com"><img alt="" src="'+Y+'"></a> <span><a target="_blank" class="twtr-join-conv" style="color:'+this.theme.shell.color+'" href="http://twitter.com/'+this._getWidgetPath()+'">'+this.footerText+"</a></span> </div> </div> </div>";return V},_appendTweet:function(V){this._insertNewResultsNumber();G(V,this.byClass("twtr-reference-tweet","div"));return this},_slide:function(W){var X=this;var V=E(W).offsetHeight;if(this.runOnce){new b(W,"height",{from:0,to:V,time:500,callback:function(){X._fade.call(X,W)}}).start()}return this},_fade:function(V){var W=this;if(b.canTransition){V.style.webkitTransition="opacity 0.5s ease-out";V.style.opacity=1;return this}new b(V,"opacity",{from:0,to:1,time:500}).start();return this},_chop:function(){if(this._isScroll){return this}var aa=this.byClass("twtr-tweet","div",true);var ab=this.byClass("twtr-new-results","div",true);if(aa.length){for(var X=aa.length-1;X>=0;X--){var Z=aa[X];var Y=parseInt(Z.offsetTop);if(Y>parseInt(this.wh[1])){H(Z)}else{break}}if(ab.length>0){var V=ab[ab.length-1];var W=parseInt(V.offsetTop);if(W>parseInt(this.wh[1])){H(V)}}}return this},_appendSlideFade:function(W){var V=W||this.tweet.element;this._chop()._appendTweet(V)._slide(V);return this},_createTweet:function(V){V.timestamp=V.created_at;V.created_at=this._isRelativeTime?q(V.created_at):y(V.created_at);this.tweet=new r(V);if(this._isLive&&this.runOnce){this.tweet.element.style.opacity=0;this.tweet.element.style.filter="alpha(opacity:0)";this.tweet.element.style.height="0"}return this},_getResults:function(){var V=this;this.timesRequested++;this.jsonRequestRunning=true;this.jsonRequestTimer=window.setTimeout(function(){if(V.jsonRequestRunning){clearTimeout(V.jsonRequestTimer);V.jsonRequestTimer=null}V.jsonRequestRunning=false;H(V.scriptElement);V.newResults=false;V.decay()},this.jsonMaxRequestTimeOut);TWTR.Widget.jsonP(V.url,function(W){V.scriptElement=W})},clear:function(){var W=this.byClass("twtr-tweet","div",true);var V=this.byClass("twtr-new-results","div",true);W=W.concat(V);f(W,function(X){H(X)});return this},_sortByMagic:function(V){var W=this;if(this._tweetFilter){if(this._tweetFilter.negatives){V=V.filter(function(X){if(!W._tweetFilter.negatives.test(X.text)){return X}})}if(this._tweetFilter.positives){V=V.filter(function(X){if(W._tweetFilter.positives.test(X.text)){return X}})}}switch(this._behavior){case"all":this._sortByLatest(V);break;case"preloaded":default:this._sortByDefault(V);break}if(this._isLive&&this._behavior!=="all"){this.intervalJob.set(this.results);this.intervalJob.start()}return this},_loadTopTweetsAtTop:function(X){var Y=[],Z=[],W=[];f(X,function(aa){if(aa.metadata&&aa.metadata.result_type&&aa.metadata.result_type=="popular"){Z.push(aa)}else{Y.push(aa)}});var V=Z.concat(Y);return V},_sortByLatest:function(V){this.results=V;this.results=this.results.slice(0,this.rpp);this.results=this._loadTopTweetsAtTop(this.results);this.results.reverse();return this},_sortByDefault:function(W){var X=this;var V=function(Z){return new Date(Z).getTime()};this.results.unshift.apply(this.results,W);f(this.results,function(Z){if(!Z.views){Z.views=0}});this.results.sort(function(aa,Z){if(V(aa.created_at)>V(Z.created_at)){return -1}else{if(V(aa.created_at)<V(Z.created_at)){return 1}else{return 0}}});this.results=this.results.slice(0,this.rpp);this.results=this._loadTopTweetsAtTop(this.results);var Y=this.results;this.results=this.results.sort(function(aa,Z){if(aa.views<Z.views){return -1}else{if(aa.views>Z.views){return 1}}return 0});if(!this._isLive){this.results.reverse()}},_prePlay:function(W){if(this.jsonRequestTimer){clearTimeout(this.jsonRequestTimer);this.jsonRequestTimer=null}if(!L.ie){H(this.scriptElement)}if(W.error){this.newResults=false}else{if(W.results&&W.results.length>0){this.response=W;this.newResults=true;this.sinceId=W.max_id_str;this._sortByMagic(W.results);if(this.isRunning()){this._play()}}else{if((this._isProfileWidget||this._isFavsWidget||this._isListWidget)&&o.array(W)&&W.length){this.newResults=true;if(!this._profileImage&&this._isProfileWidget){var V=W[0].user.screen_name;this.setProfileImage(W[0].user.profile_image_url);this.setTitle(W[0].user.name);this.setCaption('<a target="_blank" href="http://twitter.com/intent/user?screen_name='+V+'">'+V+"</a>")}this.sinceId=W[0].id_str;this._sortByMagic(W);if(this.isRunning()){this._play()}}else{this.newResults=false}}}this._setUrl();if(this._isLive){this.decay()}},_play:function(){var V=this;if(this.runOnce){this._hasNewSearchResults=true}if(this._avatars){this._preloadImages(this.results)}if(this._isRelativeTime&&(this._behavior=="all"||this._behavior=="preloaded")){f(this.byClass("twtr-timestamp","a",true),function(W){W.innerHTML=q(W.getAttribute("time"))})}if(!this._isLive||this._behavior=="all"||this._behavior=="preloaded"){f(this.results,function(X){if(X.retweeted_status){X=X.retweeted_status}if(V._isProfileWidget){X.from_user=X.user.screen_name;X.profile_image_url=X.user.profile_image_url}if(V._isFavsWidget||V._isListWidget){X.from_user=X.user.screen_name;X.profile_image_url=X.user.profile_image_url}X.id=X.id_str;V._createTweet({id:X.id,user:X.from_user,tweet:l.clean(X.text),avatar:X.profile_image_url,created_at:X.created_at,needle:X});var W=V.tweet.element;(V._behavior=="all")?V._appendSlideFade(W):V._appendTweet(W)});if(this._behavior!="preloaded"){return this}}return this},_normalizeTweet:function(W){var V=this;W.views++;if(this._isProfileWidget){W.from_user=V.username;W.profile_image_url=W.user.profile_image_url}if(this._isFavsWidget||this._isListWidget){W.from_user=W.user.screen_name;W.profile_image_url=W.user.profile_image_url}if(this._isFullScreen){W.profile_image_url=W.profile_image_url.replace(/_normal\./,"_bigger.")}W.id=W.id_str;this._createTweet({id:W.id,user:W.from_user,tweet:l.clean(W.text),avatar:W.profile_image_url,created_at:W.created_at,needle:W})._appendSlideFade()},_insertNewResultsNumber:function(){if(!this._hasNewSearchResults){this._hasNewSearchResults=false;return}if(this.runOnce&&this._isSearchWidget){var Y=this.response.total>this.rpp?this.response.total:this.response.results.length;var V=Y>1?"s":"";var X=(this.response.warning&&this.response.warning.match(/adjusted since_id/))?"more than":"";var W=document.createElement("div");I.add(W,"twtr-new-results");W.innerHTML='<div class="twtr-results-inner"> </div><div class="twtr-results-hr"> </div><span>'+X+" <strong>"+Y+"</strong> new tweet"+V+"</span>";G(W,this.byClass("twtr-reference-tweet","div"));this._hasNewSearchResults=false}},_preloadImages:function(V){if(this._isProfileWidget||this._isFavsWidget||this._isListWidget){f(V,function(X){var W=new Image();W.src=D(X.user.profile_image_url)})}else{f(V,function(W){(new Image()).src=D(W.profile_image_url)})}},_decayDecider:function(){var V=false;if(!this.runOnce){this.runOnce=true;V=true}else{if(this.newResults){V=true}}return V},start:function(){var V=this;if(!this._rendered){setTimeout(function(){V.start.call(V)},50);return this}if(!this._isLive){this._getResults()}else{this.occasionalJob.start()}this._isRunning=true;this._hasOfficiallyStarted=true;return this},stop:function(){this.occasionalJob.stop();if(this.intervalJob){this.intervalJob.stop()}this._isRunning=false;return this},pause:function(){if(this.isRunning()&&this.intervalJob){this.intervalJob.stop();I.add(this.widgetEl,"twtr-paused");this._isRunning=false}if(this._resumeTimer){clearTimeout(this._resumeTimer);this._resumeTimer=null}return this},resume:function(){var V=this;if(!this.isRunning()&&this._hasOfficiallyStarted&&this.intervalJob){this._resumeTimer=window.setTimeout(function(){V.intervalJob.start();V._isRunning=true;I.remove(V.widgetEl,"twtr-paused")},2000)}return this},isRunning:function(){return this._isRunning},destroy:function(){this.stop();this.clear();this.runOnce=false;this._hasOfficiallyStarted=false;this._profileImage=false;this._isLive=true;this._tweetFilter=false;this._isScroll=false;this.newResults=false;this._isRunning=false;this.sinceId=1;this.results=[];this.showedResults=[];this.occasionalJob.destroy();if(this.jsonRequestRunning){clearTimeout(this.jsonRequestTimer)}I.remove(this.widgetEl,"twtr-scroll");this.removeEvents();return this}}}()})();var e=/twitter\.com(\:\d{2,4})?\/intent\/(\w+)/,h={tweet:true,retweet:true,favorite:true},g="scrollbars=yes,resizable=yes,toolbar=no,location=yes",d=screen.height,c=screen.width;function a(p){p=p||window.event;var o=p.target||p.srcElement,j,k,i,n,l;while(o&&o.nodeName.toLowerCase()!=="a"){o=o.parentNode}if(o&&o.nodeName.toLowerCase()==="a"&&o.href){j=o.href.match(e);if(j){k=550;i=(j[2] in h)?420:560;n=Math.round((c/2)-(k/2));l=0;if(d>i){l=Math.round((d/2)-(i/2))}window.open(o.href,"intent",g+",width="+k+",height="+i+",left="+n+",top="+l);p.returnValue=false;p.preventDefault&&p.preventDefault()}}}if(document.addEventListener){document.addEventListener("click",a,false)}else{if(document.attachEvent){document.attachEvent("onclick",a)}}})(); 1 /** 2 * Twitter - http://twitter.com 3 * Copyright (C) 2010 Twitter 4 * Author: Dustin Diaz ([email protected]) 5 * 6 * V 2.2.5 Twitter search/profile/faves/list widget 7 * http://twitter.com/widgets 8 * For full documented source see http://twitter.com/javascripts/widgets/widget.js 9 * Hosting and modifications of the original source IS allowed. 10 * 11 * Example usage: 12 <script src="path/to/widget.js"></script> 13 <script> 14 new TWTR.Widget({ 15 type: 'search', 16 search: "your search query", // includes all advanced search queries. 17 width: 250, 18 height: 350, 19 interval: 6000, 20 subject: "What's being said about...", 21 title: "San Francisco", 22 rpp: 30, 23 footer: "Follow me", 24 theme: { 25 shell: { 26 background: '#1deb25', 27 color: '#ffffff' 28 }, 29 tweets: { 30 background: 'silver', 31 color: 'blue', 32 links: 'black' 33 } 34 }, 35 36 features: { 37 avatars: true, // defaults to false for profile widget, but true for search & faves widget 38 hashtags: true, 39 timestamp: true, 40 fullscreen: false, // ignores width and height and just goes full screen 41 scrollbar: false, 42 live: true, 43 loop: true, 44 behavior: 'default', 45 dateformat: 'absolute', // defaults to relative (eg: 3 minutes ago) 46 toptweets: true // only for search widget 47 } 48 }).render().start(); 49 </script> 50 * 51 *//** 52 * @namespace TWTR public namespace for Twitter widget 53 */TWTR=window.TWTR||{};if(!Array.forEach){Array.prototype.filter=function(e,t){var n=t||window,r=[];for(var i=0,s=this.length;i<s;++i){if(!e.call(n,this[i],i,this))continue;r.push(this[i])}return r};Array.prototype.indexOf=function(e,t){var t=t||0;for(var n=0;n<this.length;++n)if(this[n]===e)return n;return-1}}(function(){function e(e,t,n){for(var r=0,i=e.length;r<i;++r)t.call(n||window,e[r],r,e)}function t(e,t,n){this.el=e;this.prop=t;this.from=n.from;this.to=n.to;this.time=n.time;this.callback=n.callback;this.animDiff=this.to-this.from}function u(e){e=e||window.event;var t=e.target||e.srcElement,u,a,f,l,c;while(t&&t.nodeName.toLowerCase()!=="a")t=t.parentNode;if(t&&t.nodeName.toLowerCase()==="a"&&t.href){u=t.href.match(n);if(u){a=550;f=u[2]in r?420:560;l=Math.round(o/2-a/2);c=0;s>f&&(c=Math.round(s/2-f/2));window.open(t.href,"intent",i+",width="+a+",height="+f+",left="+l+",top="+c);e.returnValue=!1;e.preventDefault&&e.preventDefault()}}}if(TWTR&&TWTR.Widget)return;t.canTransition=function(){var e=document.createElement("twitter");e.style.cssText="-webkit-transition: all .5s linear;";return!!e.style.webkitTransitionProperty}();t.prototype._setStyle=function(e){switch(this.prop){case"opacity":this.el.style[this.prop]=e;this.el.style.filter="alpha(opacity="+e*100+")";break;default:this.el.style[this.prop]=e+"px"}};t.prototype._animate=function(){var e=this;this.now=new Date;this.diff=this.now-this.startTime;if(this.diff>this.time){this._setStyle(this.to);this.callback&&this.callback.call(this);clearInterval(this.timer);return}this.percentage=Math.floor(this.diff/this.time*100)/100;this.val=this.animDiff*this.percentage+this.from;this._setStyle(this.val)};t.prototype.start=function(){var e=this;this.startTime=new Date;this.timer=setInterval(function(){e._animate.call(e)},15)};TWTR.Widget=function(e){this.init(e)};(function(){function O(e,t,n){this.job=e;this.decayFn=t;this.interval=n;this.decayRate=1;this.decayMultiplier=1.25;this.maxDecayTime=18e4}function M(e,t,n){this.time=e||6e3;this.loop=t||!1;this.repeated=0;this.callback=n;this.haystack=[]}function _(e){function t(){return e.needle.metadata&&e.needle.metadata.result_type&&e.needle.metadata.result_type=="popular"?'<span class="twtr-popular">'+e.needle.metadata.recent_retweets+"+ recent retweets</span>":""}var n='<div class="twtr-tweet-wrap"> <div class="twtr-avatar"> <div class="twtr-img"><a target="_blank" href="http://twitter.com/intent/user?screen_name='+e.user+'"><img alt="'+e.user+' profile" src="'+o(e.avatar)+'"></a></div> </div> <div class="twtr-tweet-text"> <p> <a target="_blank" href="http://twitter.com/intent/user?screen_name='+e.user+'" class="twtr-user">'+e.user+"</a> "+e.tweet+' <em> <a target="_blank" class="twtr-timestamp" time="'+e.timestamp+'" href="http://twitter.com/'+e.user+"/status/"+e.id+'">'+e.created_at+'</a> · <a target="_blank" class="twtr-reply" href="http://twitter.com/intent/tweet?in_reply_to='+e.id+'">reply</a> · <a target="_blank" class="twtr-rt" href="http://twitter.com/intent/retweet?tweet_id='+e.id+'">retweet</a> · <a target="_blank" class="twtr-fav" href="http://twitter.com/intent/favorite?tweet_id='+e.id+'">favorite</a> </em> '+t()+" </p> </div> </div>",r=document.createElement("div");r.id="tweet-id-"+ ++_._tweetCount;r.className="twtr-tweet";r.innerHTML=n;this.element=r}var n={},r=location.protocol.match(/https/),i=/^.+\/profile_images/,s="https://s3.amazonaws.com/twitter_production/profile_images",o=function(e){return r?e.replace(i,s):e},u={},a=function(e){var t=u[e];if(!t){t=new RegExp("(?:^|\\s+)"+e+"(?:\\s+|$)");u[e]=t}return t},f=function(e,t,n,r){var t=t||"*",n=n||document,i=[],s=n.getElementsByTagName(t),o=a(e);for(var u=0,f=s.length;u<f;++u)if(o.test(s[u].className)){i[i.length]=s[u];r&&r.call(s[u],s[u])}return i},l=function(){var e=navigator.userAgent;return{ie:e.match(/MSIE\s([^;]*)/)}}(),c=function(e){return typeof e=="string"?document.getElementById(e):e},h=function(e){return e.replace(/^\s+|\s+$/g,"")},p=function(){var e=self.innerHeight,t=document.compatMode;if(t||l.ie)e=t=="CSS1Compat"?document.documentElement.clientHeight:document.body.clientHeight;return e},d=function(e,t){var n=e.target||e.srcElement;return t(n)},v=function(e){try{return e&&3==e.nodeType?e.parentNode:e}catch(t){}},m=function(e){var t=e.relatedTarget;t||(e.type=="mouseout"?t=e.toElement:e.type=="mouseover"&&(t=e.fromElement));return v(t)},g=function(e,t){t.parentNode.insertBefore(e,t.nextSibling)},y=function(e){try{e.parentNode.removeChild(e)}catch(t){}},b=function(e){return e.firstChild},w=function(e){var t=m(e);while(t&&t!=this)try{t=t.parentNode}catch(n){t=this}return t!=this?!0:!1},E=function(){if(document.defaultView&&document.defaultView.getComputedStyle)return function(e,t){var n=null,r=document.defaultView.getComputedStyle(e,"");r&&(n=r[t]);var i=e.style[t]||n;return i};if(document.documentElement.currentStyle&&l.ie)return function(e,t){var n=e.currentStyle?e.currentStyle[t]:null;return e.style[t]||n}}(),S={has:function(e,t){return(new RegExp("(^|\\s)"+t+"(\\s|$)")).test(c(e).className)},add:function(e,t){this.has(e,t)||(c(e).className=h(c(e).className)+" "+t)},remove:function(e,t){this.has(e,t)&&(c(e).className=c(e).className.replace(new RegExp("(^|\\s)"+t+"(\\s|$)","g"),""))}},x={add:function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,function(){n.call(e,window.event)})},remove:function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)}},T=function(){function e(e){return parseInt(e.substring(0,2),16)}function t(e){return parseInt(e.substring(2,4),16)}function n(e){return parseInt(e.substring(4,6),16)}return function(r){return[e(r),t(r),n(r)]}}(),N={bool:function(e){return typeof e=="boolean"},def:function(e){return typeof e!="undefined"},number:function(e){return typeof e=="number"&&isFinite(e)},string:function(e){return typeof e=="string"},fn:function(e){return typeof e=="function"},array:function(e){return e?N.number(e.length)&&N.fn(e.splice):!1}},C=["January","February","March","April","May","June","July","August","September","October","November","December"],k=function(e){function o(){var e=new Date;return e.getDate()!=t.getDate()||e.getYear()!=t.getYear()||e.getMonth()!=t.getMonth()?" - "+C[t.getMonth()]+" "+t.getDate()+", "+t.getFullYear():""}var t=new Date(e);l.ie&&(t=Date.parse(e.replace(/( \+)/," UTC$1")));var n="",r=function(){var e=t.getHours();if(e>0&&e<13){n="am";return e}if(e<1){n="am";return 12}n="pm";return e-12}(),i=t.getMinutes(),s=t.getSeconds();return r+":"+i+n+o()},L=function(e){var t=new Date,n=new Date(e);l.ie&&(n=Date.parse(e.replace(/( \+)/," UTC$1")));var r=t-n,i=1e3,s=i*60,o=s*60,u=o*24,a=u*7;return isNaN(r)||r<0?"":r<i*2?"right now":r<s?Math.floor(r/i)+" seconds ago":r<s*2?"about 1 minute ago":r<o?Math.floor(r/s)+" minutes ago":r<o*2?"about 1 hour ago":r<u?Math.floor(r/o)+" hours ago":r>u&&r<u*2?"yesterday":r<u*365?Math.floor(r/u)+" days ago":"over a year ago"},A={link:function(e){return e.replace(/\b(((https*\:\/\/)|www\.)[^\"\']+?)(([!?,.\)]+)?(\s|$))/g,function(e,t,n,r,i){var s=n.match(/w/)?"http://":"";return'<a class="twtr-hyperlink" target="_blank" href="'+s+t+'">'+(t.length>25?t.substr(0,24)+"...":t)+"</a>"+i})},at:function(e){return e.replace(/\B[@@]([a-zA-Z0-9_]{1,20})/g,function(e,t){return'@<a target="_blank" class="twtr-atreply" href="http://twitter.com/intent/user?screen_name='+t+'">'+t+"</a>"})},list:function(e){return e.replace(/\B[@@]([a-zA-Z0-9_]{1,20}\/\w+)/g,function(e,t){return'@<a target="_blank" class="twtr-atreply" href="http://twitter.com/'+t+'">'+t+"</a>"})},hash:function(e){return e.replace(/(^|\s+)#(\w+)/gi,function(e,t,n){return t+'<a target="_blank" class="twtr-hashtag" href="http://twitter.com/search?q=%23'+n+'">#'+n+"</a>"})},clean:function(e){return this.hash(this.at(this.list(this.link(e))))}};O.prototype={start:function(){this.stop().run();return this},stop:function(){this.worker&&window.clearTimeout(this.worker);return this},run:function(){var e=this;this.job(function(){e.decayRate=e.decayFn()?Math.max(1,e.decayRate/e.decayMultiplier):e.decayRate*e.decayMultiplier;var t=e.interval*e.decayRate;t=t>=e.maxDecayTime?e.maxDecayTime:t;t=Math.floor(t);e.worker=window.setTimeout(function(){e.run.call(e)},t)})},destroy:function(){this.stop();this.decayRate=1;return this}};M.prototype={set:function(e){this.haystack=e},add:function(e){this.haystack.unshift(e)},start:function(){if(this.timer)return this;this._job();var e=this;this.timer=setInterval(function(){e._job.call(e)},this.time);return this},stop:function(){if(this.timer){window.clearInterval(this.timer);this.timer=null}return this},_next:function(){var e=this.haystack.shift();e&&this.loop&&this.haystack.push(e);return e||null},_job:function(){var e=this._next();e&&this.callback(e);return this}};_._tweetCount=0;n.loadStyleSheet=function(e,t){if(!TWTR.Widget.loadingStyleSheet){TWTR.Widget.loadingStyleSheet=!0;var n=document.createElement("link");n.href=e;n.rel="stylesheet";n.type="text/css";document.getElementsByTagName("head")[0].appendChild(n);var r=setInterval(function(){var e=E(t,"position");if(e=="relative"){clearInterval(r);r=null;TWTR.Widget.hasLoadedStyleSheet=!0}},50)}};(function(){var e=!1;n.css=function(t){function i(){document.getElementsByTagName("head")[0].appendChild(n)}var n=document.createElement("style");n.type="text/css";if(l.ie)n.styleSheet.cssText=t;else{var r=document.createDocumentFragment();r.appendChild(document.createTextNode(t));n.appendChild(r)}!l.ie||e?i():window.attachEvent("onload",function(){e=!0;i()})}})();TWTR.Widget.isLoaded=!1;TWTR.Widget.loadingStyleSheet=!1;TWTR.Widget.hasLoadedStyleSheet=!1;TWTR.Widget.WIDGET_NUMBER=0;TWTR.Widget.matches={mentions:/^@[a-zA-Z0-9_]{1,20}\b/,any_mentions:/\b@[a-zA-Z0-9_]{1,20}\b/};TWTR.Widget.jsonP=function(e,t){var n=document.createElement("script"),r=document.getElementsByTagName("head")[0];n.type="text/javascript";n.src=e;r.insertBefore(n,r.firstChild);t(n);return n};TWTR.Widget.prototype=function(){var i=r?"https://":"http://",s=window.location.hostname.match(/twitter\.com/)?window.location.hostname+":"+window.location.port:"twitter.com",u=i+"search."+s+"/search.",a=i+"api."+s+"/1/statuses/user_timeline.",h=i+s+"/favorites/",d=i+"api."+s+"/1/",v=25e3,m=r?"https://twitter-widgets.s3.amazonaws.com/j/1/default.gif":"http://widgets.twimg.com/j/1/default.gif";return{init:function(e){var t=this;this._widgetNumber=++TWTR.Widget.WIDGET_NUMBER;TWTR.Widget["receiveCallback_"+this._widgetNumber]=function(e){t._prePlay.call(t,e)};this._cb="TWTR.Widget.receiveCallback_"+this._widgetNumber;this.opts=e;this._base=u;this._isRunning=!1;this._hasOfficiallyStarted=!1;this._hasNewSearchResults=!1;this._rendered=!1;this._profileImage=!1;this._isCreator=!!e.creator;this._setWidgetType(e.type);this.timesRequested=0;this.runOnce=!1;this.newResults=!1;this.results=[];this.jsonMaxRequestTimeOut=19e3;this.showedResults=[];this.sinceId=1;this.source="TWITTERINC_WIDGET";this.id=e.id||"twtr-widget-"+this._widgetNumber;this.tweets=0;this.setDimensions(e.width,e.height);this.interval=e.interval||6e3;this.format="json";this.rpp=e.rpp||50;this.subject=e.subject||"";this.title=e.title||"";this.setFooterText(e.footer);this.setSearch(e.search);this._setUrl();this.theme=e.theme?e.theme:this._getDefaultTheme();e.id||document.write('<div class="twtr-widget" id="'+this.id+'"></div>');this.widgetEl=c(this.id);e.id&&S.add(this.widgetEl,"twtr-widget");e.version>=2&&!TWTR.Widget.hasLoadedStyleSheet&&n.loadStyleSheet("/wp-content/plugins/noprofeedorg/css/npf-twitter.css",this.widgetEl);this.occasionalJob=new O(function(e){t.decay=e;t._getResults.call(t)},function(){return t._decayDecider.call(t)},v);this._ready=N.fn(e.ready)?e.ready:function(){};this._isRelativeTime=!0;this._tweetFilter=!1;this._avatars=!0;this._isFullScreen=!1;this._isLive=!0;this._isScroll=!1;this._loop=!0;this._showTopTweets=this._isSearchWidget?!0:!1;this._behavior="default";this.setFeatures(this.opts.features);this.intervalJob=new M(this.interval,this._loop,function(e){t._normalizeTweet(e)});return this},setDimensions:function(e,t){this.wh=e&&t?[e,t]:[250,300];e=="auto"||e=="100%"?this.wh[0]="100%":this.wh[0]=(this.wh[0]<150?150:this.wh[0])+"px";this.wh[1]=(this.wh[1]<100?100:this.wh[1])+"px";return this},setRpp:function(e){var e=parseInt(e);this.rpp=N.number(e)&&e>0&&e<=100?e:30;return this},_setWidgetType:function(e){this._isSearchWidget=!1,this._isProfileWidget=!1,this._isFavsWidget=!1,this._isListWidget=!1;switch(e){case"profile":this._isProfileWidget=!0;break;case"search":this._isSearchWidget=!0,this.search=this.opts.search;break;case"faves":case"favs":this._isFavsWidget=!0;break;case"list":case"lists":this._isListWidget=!0}return this},setFeatures:function(e){if(e){N.def(e.filters)&&(this._tweetFilter=e.filters);N.def(e.dateformat)&&(this._isRelativeTime=e.dateformat!=="absolute");if(N.def(e.fullscreen)&&N.bool(e.fullscreen)&&e.fullscreen){this._isFullScreen=!0;this.wh[0]="100%";this.wh[1]=p()-90+"px";var t=this;x.add(window,"resize",function(e){t.wh[1]=p();t._fullScreenResize()})}N.def(e.loop)&&N.bool(e.loop)&&(this._loop=e.loop);if(N.def(e.behavior)&&N.string(e.behavior))switch(e.behavior){case"all":this._behavior="all";break;case"preloaded":this._behavior="preloaded";break;default:this._behavior="default"}if(N.def(e.toptweets)&&N.bool(e.toptweets)){this._showTopTweets=e.toptweets;var r=this._showTopTweets?"inline-block":"none";n.css("#"+this.id+" .twtr-popular { display: "+r+"; }")}if(!N.def(e.toptweets)){this._showTopTweets=!0;var r=this._showTopTweets?"inline-block":"none";n.css("#"+this.id+" .twtr-popular { display: "+r+"; }")}if(N.def(e.avatars)&&N.bool(e.avatars))if(!e.avatars){n.css("#"+this.id+" .twtr-avatar, #"+this.id+" .twtr-user { display: none; } "+"#"+this.id+" .twtr-tweet-text { margin-left: 0; }");this._avatars=!1}else{var i=this._isFullScreen?"90px":"40px";n.css("#"+this.id+" .twtr-avatar { display: block; } #"+this.id+" .twtr-user { display: inline; } "+"#"+this.id+" .twtr-tweet-text { margin-left: "+i+"; }");this._avatars=!0}else if(this._isProfileWidget){this.setFeatures({avatars:!1});this._avatars=!1}else{this.setFeatures({avatars:!0});this._avatars=!0}N.def(e.hashtags)&&N.bool(e.hashtags)&&(e.hashtags?"":n.css("#"+this.id+" a.twtr-hashtag { display: none; }"));if(N.def(e.timestamp)&&N.bool(e.timestamp)){var s=e.timestamp?"block":"none";n.css("#"+this.id+" em { display: "+s+"; }")}N.def(e.live)&&N.bool(e.live)&&(this._isLive=e.live);N.def(e.scrollbar)&&N.bool(e.scrollbar)&&(this._isScroll=e.scrollbar)}else{if(this._isProfileWidget){this.setFeatures({avatars:!1});this._avatars=!1}(this._isProfileWidget||this._isFavsWidget)&&this.setFeatures({behavior:"all"})}return this},_fullScreenResize:function(){var e=f("twtr-timeline","div",document.body,function(e){e.style.height=p()-90+"px"})},setTweetInterval:function(e){this.interval=e;return this},setBase:function(e){this._base=e;return this},setUser:function(e,t){this.username=e;this.realname=t||" ";this._isFavsWidget?this.setBase(h+e+"."):this._isProfileWidget&&this.setBase(a+this.format+"?screen_name="+e);this.setSearch(" ");return this},setList:function(e,t){this.listslug=t.replace(/ /g,"-").toLowerCase();this.username=e;this.setBase(d+e+"/lists/"+this.listslug+"/statuses.");this.setSearch(" ");return this},setProfileImage:function(e){this._profileImage=e;this.byClass("twtr-profile-img","img").src=o(e);this.byClass("twtr-profile-img-anchor","a").href="http://twitter.com/intent/user?screen_name="+this.username;return this},setTitle:function(e){this.title=e;this.widgetEl.getElementsByTagName("h3")[0].innerHTML=this.title;return this},setCaption:function(e){this.subject=e;this.widgetEl.getElementsByTagName("h4")[0].innerHTML=this.subject;return this},setFooterText:function(e){this.footerText=N.def(e)&&N.string(e)?e:"Join the conversation";this._rendered&&(this.byClass("twtr-join-conv","a").innerHTML=this.footerText);return this},setSearch:function(e){this.searchString=e||"";this.search=encodeURIComponent(this.searchString);this._setUrl();if(this._rendered){var t=this.byClass("twtr-join-conv","a");t.href="http://twitter.com/"+this._getWidgetPath()}return this},_getWidgetPath:function(){return this._isProfileWidget?this.username:this._isFavsWidget?this.username+"/favorites":this._isListWidget?this.username+"/lists/"+this.listslug:"#search?q="+this.search},_setUrl:function(){function t(){return"&"+ +(new Date)+"=cachebust"}function n(){return e.sinceId==1?"":"&since_id="+e.sinceId+"&refresh=true"}var e=this;if(this._isProfileWidget)this.url=this._base+"&callback="+this._cb+"&include_rts=true"+"&count="+this.rpp+n()+"&clientsource="+this.source;else if(this._isFavsWidget||this._isListWidget)this.url=this._base+this.format+"?callback="+this._cb+n()+"&include_rts=true"+"&clientsource="+this.source;else{this.url=this._base+this.format+"?q="+this.search+"&include_rts=true"+"&callback="+this._cb+"&rpp="+this.rpp+n()+"&clientsource="+this.source;this.runOnce||(this.url+="&result_type=mixed")}this.url+=t();return this},_getRGB:function(e){return T(e.substring(1,7))},setTheme:function(e,t){var r=this,i=" !important",s=window.location.hostname.match(/twitter\.com/)&&window.location.pathname.match(/goodies/);if(t||s)i="";this.theme={shell:{background:function(){return e.shell.background||r._getDefaultTheme().shell.background}(),color:function(){return e.shell.color||r._getDefaultTheme().shell.color}()},tweets:{background:function(){return e.tweets.background||r._getDefaultTheme().tweets.background}(),color:function(){return e.tweets.color||r._getDefaultTheme().tweets.color}(),links:function(){return e.tweets.links||r._getDefaultTheme().tweets.links}()}};var o="#"+this.id+" .twtr-doc, #"+this.id+" .twtr-hd a, #"+this.id+" h3, #"+this.id+" h4, #"+this.id+" .twtr-popular { background-color: "+this.theme.shell.background+i+"; color: "+this.theme.shell.color+i+"; } #"+this.id+" .twtr-popular { color: "+this.theme.tweets.color+i+"; background-color: rgba("+this._getRGB(this.theme.shell.background)+", .3)"+i+"; } #"+this.id+" .twtr-tweet a { color: "+this.theme.tweets.links+i+"; } #"+this.id+" .twtr-bd, #"+this.id+" .twtr-timeline i a, #"+this.id+" .twtr-bd p { color: "+this.theme.tweets.color+i+"; } #"+this.id+" .twtr-new-results, #"+this.id+" .twtr-results-inner, #"+this.id+" .twtr-timeline { background: "+this.theme.tweets.background+i+"; }";l.ie&&(o+="#"+this.id+" .twtr-tweet { background: "+this.theme.tweets.background+i+"; }");n.css(o);return this},byClass:function(e,t,n){var r=f(e,t,c(this.id));return n?r:r[0]},render:function(){var e=this;if(!TWTR.Widget.hasLoadedStyleSheet){window.setTimeout(function(){e.render.call(e)},50);return this}this.setTheme(this.theme,this._isCreator);this._isProfileWidget&&S.add(this.widgetEl,"twtr-widget-profile");this._isScroll&&S.add(this.widgetEl,"twtr-scroll");!this._isLive&&!this._isScroll&&(this.wh[1]="auto");this._isSearchWidget&&this._isFullScreen&&(document.title="Twitter search: "+escape(this.searchString));this.widgetEl.innerHTML=this._getWidgetHtml();var t=this.byClass("twtr-timeline","div");if(this._isLive&&!this._isFullScreen){var n=function(t){if(e._behavior==="all")return;w.call(this,t)&&e.pause.call(e)},r=function(t){if(e._behavior==="all")return;w.call(this,t)&&e.resume.call(e)};this.removeEvents=function(){x.remove(t,"mouseover",n);x.remove(t,"mouseout",r)};x.add(t,"mouseover",n);x.add(t,"mouseout",r)}this._rendered=!0;this._ready();return this},removeEvents:function(){},_getDefaultTheme:function(){return{shell:{background:"#8ec1da",color:"#ffffff"},tweets:{background:"#ffffff",color:"#444444",links:"#1985b5"}}},_getWidgetHtml:function(){function t(){return e._isProfileWidget?'<a target="_blank" href="http://twitter.com/" class="twtr-profile-img-anchor"><img alt="profile" class="twtr-profile-img" src="'+m+'"></a> <h3 class="pippo"></h3> <h4></h4>':'<h3 class="pippo">'+e.title+"</h3><h4>"+e.subject+"</h4>"}function n(){return e._isFullScreen?" twtr-fullscreen":""}var e=this,i=r?"https://twitter-widgets.s3.amazonaws.com/i/widget-logo.png":"http://widgets.twimg.com/i/widget-logo.png";this._isFullScreen&&(i="https://twitter-widgets.s3.amazonaws.com/i/widget-logo-fullscreen.png");var s='<div class="twtr-doc'+n()+'" style="width: '+this.wh[0]+';"> <div class="twtr-hd">'+t()+' </div> <div class="twtr-bd"> <div class="twtr-timeline" style="height: '+this.wh[1]+';"> <div class="twtr-tweets"> <div class="twtr-reference-tweet"></div> <!-- tweets show here --> </div> </div> </div> <div class="twtr-ft"> <div><a target="_blank" href="http://twitter.com"><img alt="" src="'+i+'"></a> <span><a target="_blank" class="twtr-join-conv" style="color:'+this.theme.shell.color+'" href="http://twitter.com/'+this._getWidgetPath()+'">'+this.footerText+"</a></span> </div> </div> </div>";return s},_appendTweet:function(e){this._insertNewResultsNumber();g(e,this.byClass("twtr-reference-tweet","div"));return this},_slide:function(e){var n=this,r=b(e).offsetHeight;this.runOnce&&(new t(e,"height",{from:0,to:r,time:500,callback:function(){n._fade.call(n,e)}})).start();return this},_fade:function(e){var n=this;if(t.canTransition){e.style.webkitTransition="opacity 0.5s ease-out";e.style.opacity=1;return this}(new t(e,"opacity",{from:0,to:1,time:500})).start();return this},_chop:function(){if(this._isScroll)return this;var e=this.byClass("twtr-tweet","div",!0),t=this.byClass("twtr-new-results","div",!0);if(e.length){for(var n=e.length-1;n>=0;n--){var r=e[n],i=parseInt(r.offsetTop);if(!(i>parseInt(this.wh[1])))break;y(r)}if(t.length>0){var s=t[t.length-1],o=parseInt(s.offsetTop);o>parseInt(this.wh[1])&&y(s)}}return this},_appendSlideFade:function(e){var t=e||this.tweet.element;this._chop()._appendTweet(t)._slide(t);return this},_createTweet:function(e){e.timestamp=e.created_at;e.created_at=this._isRelativeTime?L(e.created_at):k(e.created_at);this.tweet=new _(e);if(this._isLive&&this.runOnce){this.tweet.element.style.opacity=0;this.tweet.element.style.filter="alpha(opacity:0)";this.tweet.element.style.height="0"}return this},_getResults:function(){var e=this;this.timesRequested++;this.jsonRequestRunning=!0;this.jsonRequestTimer=window.setTimeout(function(){if(e.jsonRequestRunning){clearTimeout(e.jsonRequestTimer);e.jsonRequestTimer=null}e.jsonRequestRunning=!1;y(e.scriptElement);e.newResults=!1;e.decay()},this.jsonMaxRequestTimeOut);TWTR.Widget.jsonP(e.url,function(t){e.scriptElement=t})},clear:function(){var t=this.byClass("twtr-tweet","div",!0),n=this.byClass("twtr-new-results","div",!0);t=t.concat(n);e(t,function(e){y(e)});return this},_sortByMagic:function(e){var t=this;if(this._tweetFilter){this._tweetFilter.negatives&&(e=e.filter(function(e){if(!t._tweetFilter.negatives.test(e.text))return e}));this._tweetFilter.positives&&(e=e.filter(function(e){if(t._tweetFilter.positives.test(e.text))return e}))}switch(this._behavior){case"all":this._sortByLatest(e);break;case"preloaded":default:this._sortByDefault(e)}if(this._isLive&&this._behavior!=="all"){this.intervalJob.set(this.results);this.intervalJob.start()}return this},_loadTopTweetsAtTop:function(t){var n=[],r=[],i=[];e(t,function(e){e.metadata&&e.metadata.result_type&&e.metadata.result_type=="popular"?r.push(e):n.push(e)});var s=r.concat(n);return s},_sortByLatest:function(e){this.results=e;this.results=this.results.slice(0,this.rpp);this.results=this._loadTopTweetsAtTop(this.results);this.results.reverse();return this},_sortByDefault:function(t){var n=this,r=function(e){return(new Date(e)).getTime()};this.results.unshift.apply(this.results,t);e(this.results,function(e){e.views||(e.views=0)});this.results.sort(function(e,t){return r(e.created_at)>r(t.created_at)?-1:r(e.created_at)<r(t.created_at)?1:0});this.results=this.results.slice(0,this.rpp);this.results=this._loadTopTweetsAtTop(this.results);var i=this.results;this.results=this.results.sort(function(e,t){return e.views<t.views?-1:e.views>t.views?1:0});this._isLive||this.results.reverse()},_prePlay:function(e){if(this.jsonRequestTimer){clearTimeout(this.jsonRequestTimer);this.jsonRequestTimer=null}l.ie||y(this.scriptElement);if(e.error)this.newResults=!1;else if(e.results&&e.results.length>0){this.response=e;this.newResults=!0;this.sinceId=e.max_id_str;this._sortByMagic(e.results);this.isRunning()&&this._play()}else if((this._isProfileWidget||this._isFavsWidget||this._isListWidget)&&N.array(e)&&e.length){this.newResults=!0;if(!this._profileImage&&this._isProfileWidget){var t=e[0].user.screen_name;this.setProfileImage(e[0].user.profile_image_url);this.setTitle(e[0].user.name);this.setCaption('<a target="_blank" href="http://twitter.com/intent/user?screen_name='+t+'">'+t+"</a>")}this.sinceId=e[0].id_str;this._sortByMagic(e);this.isRunning()&&this._play()}else this.newResults=!1;this._setUrl();this._isLive&&this.decay()},_play:function(){var t=this;this.runOnce&&(this._hasNewSearchResults=!0);this._avatars&&this._preloadImages(this.results);this._isRelativeTime&&(this._behavior=="all"||this._behavior=="preloaded")&&e(this.byClass("twtr-timestamp","a",!0),function(e){e.innerHTML=L(e.getAttribute("time"))});if(!this._isLive||this._behavior=="all"||this._behavior=="preloaded"){e(this.results,function(e){e.retweeted_status&&(e=e.retweeted_status);if(t._isProfileWidget){e.from_user=e.user.screen_name;e.profile_image_url=e.user.profile_image_url}if(t._isFavsWidget||t._isListWidget){e.from_user=e.user.screen_name;e.profile_image_url=e.user.profile_image_url}e.id=e.id_str;t._createTweet({id:e.id,user:e.from_user,tweet:A.clean(e.text),avatar:e.profile_image_url,created_at:e.created_at,needle:e});var n=t.tweet.element;t._behavior=="all"?t._appendSlideFade(n):t._appendTweet(n)});if(this._behavior!="preloaded")return this}return this},_normalizeTweet:function(e){var t=this;e.views++;if(this._isProfileWidget){e.from_user=t.username;e.profile_image_url=e.user.profile_image_url}if(this._isFavsWidget||this._isListWidget){e.from_user=e.user.screen_name;e.profile_image_url=e.user.profile_image_url}this._isFullScreen&&(e.profile_image_url=e.profile_image_url.replace(/_normal\./,"_bigger."));e.id=e.id_str;this._createTweet({id:e.id,user:e.from_user,tweet:A.clean(e.text),avatar:e.profile_image_url,created_at:e.created_at,needle:e})._appendSlideFade()},_insertNewResultsNumber:function(){if(!this._hasNewSearchResults){this._hasNewSearchResults=!1;return}if(this.runOnce&&this._isSearchWidget){var e=this.response.total>this.rpp?this.response.total:this.response.results.length,t=e>1?"s":"",n=this.response.warning&&this.response.warning.match(/adjusted since_id/)?"more than":"",r=document.createElement("div");S.add(r,"twtr-new-results");r.innerHTML='<div class="twtr-results-inner"> </div><div class="twtr-results-hr"> </div><span>'+n+" <strong>"+e+"</strong> new tweet"+t+"</span>";g(r,this.byClass("twtr-reference-tweet","div"));this._hasNewSearchResults=!1}},_preloadImages:function(t){this._isProfileWidget||this._isFavsWidget||this._isListWidget?e(t,function(e){var t=new Image;t.src=o(e.user.profile_image_url)}):e(t,function(e){(new Image).src=o(e.profile_image_url)})},_decayDecider:function(){var e=!1;if(!this.runOnce){this.runOnce=!0;e=!0}else this.newResults&&(e=!0);return e},start:function(){var e=this;if(!this._rendered){setTimeout(function(){e.start.call(e)},50);return this}this._isLive?this.occasionalJob.start():this._getResults();this._isRunning=!0;this._hasOfficiallyStarted=!0;return this},stop:function(){this.occasionalJob.stop();this.intervalJob&&this.intervalJob.stop();this._isRunning=!1;return this},pause:function(){if(this.isRunning()&&this.intervalJob){this.intervalJob.stop();S.add(this.widgetEl,"twtr-paused");this._isRunning=!1}if(this._resumeTimer){clearTimeout(this._resumeTimer);this._resumeTimer=null}return this},resume:function(){var e=this;!this.isRunning()&&this._hasOfficiallyStarted&&this.intervalJob&&(this._resumeTimer=window.setTimeout(function(){e.intervalJob.start();e._isRunning=!0;S.remove(e.widgetEl,"twtr-paused")},2e3));return this},isRunning:function(){return this._isRunning},destroy:function(){this.stop();this.clear();this.runOnce=!1;this._hasOfficiallyStarted=!1;this._profileImage=!1;this._isLive=!0;this._tweetFilter=!1;this._isScroll=!1;this.newResults=!1;this._isRunning=!1;this.sinceId=1;this.results=[];this.showedResults=[];this.occasionalJob.destroy();this.jsonRequestRunning&&clearTimeout(this.jsonRequestTimer);S.remove(this.widgetEl,"twtr-scroll");this.removeEvents();return this}}}()})();var n=/twitter\.com(\:\d{2,4})?\/intent\/(\w+)/,r={tweet:!0,retweet:!0,favorite:!0},i="scrollbars=yes,resizable=yes,toolbar=no,location=yes",s=screen.height,o=screen.width;document.addEventListener?document.addEventListener("click",u,!1):document.attachEvent&&document.attachEvent("onclick",u)})(); -
noprofeedorg/trunk/js/npf-wid.js
r403247 r640433 1 addLoadListener(initSliders);function initSliders(){var c=getElementsByAttribute("class","slider");for(var f=0;f<c.length;f++){var b=document.createElement("div");var j=document.createElement("div");var e=document.createElement("input");var h=c[f].getAttribute("id");if(h!=null||h!=""){b.setAttribute("id",h+"SliderContainer")}b.className="sliderContainer";j.className="sliderWidget";j.style.left=c[f].getAttribute("value")+"px";j.valueX=parseInt(c[f].getAttribute("value"),10);try{e.setAttribute("id",c[f].getAttribute("id"));e.setAttribute("name",c[f].getAttribute("name"));e.setAttribute("type","hidden");e.setAttribute("value",c[f].getAttribute("value"))}catch(d){return false}b.appendChild(j);c[f].parentNode.insertBefore(b,c[f]);c[f].parentNode.replaceChild(e,c[f]);b.input=e;attachEventListener(j,"mousedown",mousedownSlider,false)}var g=document.getElementById("nop_slider_wait");if(g){g.style.display="none"}return true}function mousedownSlider(b){if(typeof b=="undefined"){b=window.event}var c=getEventTarget(b);while(!/(^| )sliderWidget( |$)/.test(c.className)){c=c.parentNode}document.currentSlider=c;c.originX=b.clientX;attachEventListener(document,"mousemove",mousemoveSlider,false);attachEventListener(document,"mouseup",mouseupSlider,false);stopDefaultAction(b);return true}function mousemoveSlider(e){if(typeof e=="undefined"){e=window.event}var d=document.currentSlider;var c=d.valueX;var b=1;if(isNaN(c)){c=0}c+=e.clientX-d.originX;if(c<0){c=0}else{if(c>(d.parentNode.offsetWidth-d.offsetWidth)){c=d.parentNode.offsetWidth-d.offsetWidth}else{d.originX=e.clientX}}d.style.left=Math.round(c/b)*b+"px";d.parentNode.input.setAttribute("value",Math.round(c/b)*b);d.valueX=c;stopDefaultAction(e);npf_wid_setDynamicWidget(1);return true}function mouseupSlider(){detachEventListener(document,"mousemove",mousemoveSlider,false);detachEventListener(document,"mouseup",mouseupSlider,false);return true}function addLoadListener(c){if(typeof window.addEventListener!="undefined"){window.addEventListener("load",c,false)}else{if(typeof document.addEventListener!="undefined"){document.addEventListener("load",c,false)}else{if(typeof window.attachEvent!="undefined"){window.attachEvent("onload",c)}else{var b=window.onload;if(typeof window.onload!="function"){window.onload=c}else{window.onload=function(){b();c()}}}}}}function attachEventListener(f,d,e,c){if(typeof f.addEventListener!="undefined"){f.addEventListener(d,e,c)}else{if(typeof f.attachEvent!="undefined"){f.attachEvent("on"+d,e)}else{d="on"+d;if(typeof f[d]=="function"){var b=f[d];f[d]=function(){b();return e()}}else{f[d]=e}}}return true}function detachEventListener(e,c,d,b){if(typeof e.removeEventListener!="undefined"){e.removeEventListener(c,d,b)}else{if(typeof e.detachEvent!="undefined"){e.detachEvent("on"+c,d)}else{e["on"+c]=null}}return true}function getEventTarget(c){var b=null;if(typeof c.target!="undefined"){b=c.target}else{b=c.srcElement}while(b.nodeType==3&&b.parentNode!=null){b=b.parentNode}return b}function stopDefaultAction(b){b.returnValue=false;if(typeof b.preventDefault!="undefined"){b.preventDefault()}return true}function getElementsByAttribute(f,e){var b=new Array();var d=new Array();if(document.all){b=document.all}else{b=document.getElementsByTagName("*")}for(var c=0;c<b.length;c++){if(f=="class"){var g=new RegExp("(^| )"+e+"( |$)");if(b[c].className.match(g)){d[d.length]=b[c]}}else{if(f=="for"){if(b[c].getAttribute("htmlFor")||b[c].getAttribute("for")){if(b[c].htmlFor==e){d[d.length]=b[c]}}}else{if(b[c].getAttribute(f)==e){d[d.length]=b[c]}}}}return d}var sMax;var holder;var preSet;var rated;function npf_WidRating(b,c){sMax=0;for(n=0;n<b.parentNode.childNodes.length;n++){if(b.parentNode.childNodes[n].nodeName=="A"){sMax++}}if(!rated){s=b.id.replace("widrate"+c+"_","");a=0;for(i=1;i<=sMax;i++){if(i<=s){document.getElementById("widrate"+c+"_"+i).className="on";document.getElementById("npf-wid-rateStatus-"+c).innerHTML=b.title;holder=a+1;a++}else{document.getElementById("widrate"+c+"_"+i).className=""}}}}function npf_WidRatingOff(b,c){if(!rated){if(!preSet){for(i=1;i<=sMax;i++){document.getElementById("widrate"+c+"_"+i).className="";document.getElementById("npf-wid-rateStatus-"+c).innerHTML=b.parentNode.title}}else{npf_WidRating(preSet);document.getElementById("npf-wid-rateStatus-"+c).innerHTML=document.getElementById("npf-wid-ratingSaved-"+c).innerHTML}}}function npf_WidRate(b,c){if(!rated){document.getElementById("npf-wid-rateStatus-"+c).innerHTML=document.getElementById("npf-wid-ratingSaved-"+c).innerHTML+" :: "+b.title;preSet=b;rated=1;npf_WidRatingSendRate(b,c);npf_WidRating(b,c)}}function npf_WidRatingSendRate(b){alert("Your rating was: "+b.title+"\n\nAJAX code to be implemented!")}function npf_setActualRating(c,d){for(var b=1;b<=c;b++){npf_WidRating(document.getElementById("widrate"+d+"_"+b),d)}}var jscolor={dir:"",bindClass:"nop-wid-color",binding:true,preloading:true,install:function(){jscolor.addEvent(window,"load",jscolor.init)},init:function(){if(jscolor.binding){jscolor.bind()}if(jscolor.preloading){jscolor.preload()}},getDir:function(){if(!jscolor.dir){var b=jscolor.detectDir();jscolor.dir=b!==false?b:"http://myeasywp.com/service/meh-img/"}return jscolor.dir},detectDir:function(){var d=location.href;var f=document.getElementsByTagName("base");for(var b=0;b<f.length;b+=1){if(f[b].href){d=f[b].href}}var f=document.getElementsByTagName("script");for(var b=0;b<f.length;b+=1){if(f[b].src&&/(^|\/)jscolor\.js([?#].*)?$/i.test(f[b].src)){var g=new jscolor.URI(f[b].src);var c=g.toAbsolute(d);c.path=c.path.replace(/[^\/]+$/,"");c.query=null;c.fragment=null;return c.toString()}}return false},bind:function(){var matchClass=new RegExp("(^|\\s)("+jscolor.bindClass+")\\s*(\\{[^}]*\\})?","i");var e=document.getElementsByTagName("input");for(var i=0;i<e.length;i+=1){var m;if(!e[i].color&&e[i].className&&(m=e[i].className.match(matchClass))){var prop={};if(m[3]){try{eval("prop="+m[3])}catch(eInvalidProp){}}e[i].color=new jscolor.color(e[i],prop)}}},preload:function(){for(var b in jscolor.imgRequire){if(jscolor.imgRequire.hasOwnProperty(b)){jscolor.loadImage(b)}}},images:{pad:[181,101],sld:[16,101],cross:[15,15],arrow:[7,11]},imgRequire:{},imgLoaded:{},requireImage:function(b){jscolor.imgRequire[b]=true},loadImage:function(b){if(!jscolor.imgLoaded[b]){jscolor.imgLoaded[b]=new Image();jscolor.imgLoaded[b].src=jscolor.getDir()+b}},fetchElement:function(b){return typeof b==="string"?document.getElementById(b):b},addEvent:function(b,d,c){if(b.addEventListener){b.addEventListener(d,c,false)}else{if(b.attachEvent){b.attachEvent("on"+d,c)}}},fireEvent:function(b,d){if(!b){return}if(document.createEventObject){var c=document.createEventObject();b.fireEvent("on"+d,c)}else{if(document.createEvent){var c=document.createEvent("HTMLEvents");c.initEvent(d,true,true);b.dispatchEvent(c)}else{if(b["on"+d]){b["on"+d]()}}}},getElementPos:function(d){var f=d,c=d;var b=0,g=0;if(f.offsetParent){do{b+=f.offsetLeft;g+=f.offsetTop}while(f=f.offsetParent)}while((c=c.parentNode)&&c.nodeName.toUpperCase()!=="BODY"){b-=c.scrollLeft;g-=c.scrollTop}return[b,g]},getElementSize:function(b){return[b.offsetWidth,b.offsetHeight]},getMousePos:function(b){if(!b){b=window.event}if(typeof b.pageX==="number"){return[b.pageX,b.pageY]}else{if(typeof b.clientX==="number"){return[b.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,b.clientY+document.body.scrollTop+document.documentElement.scrollTop]}}},getViewPos:function(){if(typeof window.pageYOffset==="number"){return[window.pageXOffset,window.pageYOffset]}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){return[document.body.scrollLeft,document.body.scrollTop]}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){return[document.documentElement.scrollLeft,document.documentElement.scrollTop]}else{return[0,0]}}}},getViewSize:function(){if(typeof window.innerWidth==="number"){return[window.innerWidth,window.innerHeight]}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){return[document.body.clientWidth,document.body.clientHeight]}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){return[document.documentElement.clientWidth,document.documentElement.clientHeight]}else{return[0,0]}}}},URI:function(b){this.scheme=null;this.authority=null;this.path="";this.query=null;this.fragment=null;this.parse=function(e){var d=e.match(/^(([A-Za-z][0-9A-Za-z+.-]*)(:))?((\/\/)([^\/?#]*))?([^?#]*)((\?)([^#]*))?((#)(.*))?/);this.scheme=d[3]?d[2]:null;this.authority=d[5]?d[6]:null;this.path=d[7];this.query=d[9]?d[10]:null;this.fragment=d[12]?d[13]:null;return this};this.toString=function(){var d="";if(this.scheme!==null){d=d+this.scheme+":"}if(this.authority!==null){d=d+"//"+this.authority}if(this.path!==null){d=d+this.path}if(this.query!==null){d=d+"?"+this.query}if(this.fragment!==null){d=d+"#"+this.fragment}return d};this.toAbsolute=function(f){var f=new jscolor.URI(f);var e=this;var d=new jscolor.URI;if(f.scheme===null){return false}if(e.scheme!==null&&e.scheme.toLowerCase()===f.scheme.toLowerCase()){e.scheme=null}if(e.scheme!==null){d.scheme=e.scheme;d.authority=e.authority;d.path=c(e.path);d.query=e.query}else{if(e.authority!==null){d.authority=e.authority;d.path=c(e.path);d.query=e.query}else{if(e.path===""){d.path=f.path;if(e.query!==null){d.query=e.query}else{d.query=f.query}}else{if(e.path.substr(0,1)==="/"){d.path=c(e.path)}else{if(f.authority!==null&&f.path===""){d.path="/"+e.path}else{d.path=f.path.replace(/[^\/]+$/,"")+e.path}d.path=c(d.path)}d.query=e.query}d.authority=f.authority}d.scheme=f.scheme}d.fragment=e.fragment;return d};function c(f){var d="";while(f){if(f.substr(0,3)==="../"||f.substr(0,2)==="./"){f=f.replace(/^\.+/,"").substr(1)}else{if(f.substr(0,3)==="/./"||f==="/."){f="/"+f.substr(3)}else{if(f.substr(0,4)==="/../"||f==="/.."){f="/"+f.substr(4);d=d.replace(/\/?[^\/]*$/,"")}else{if(f==="."||f===".."){f=""}else{var e=f.match(/^\/?[^\/]*/)[0];f=f.substr(e.length);d=d+e}}}}}return d}if(b){this.parse(b)}},color:function(E,e){this.required=true;this.adjust=true;this.hash=false;this.caps=true;this.valueElement=E;this.styleElement=E;this.hsv=[0,0,1];this.rgb=[1,1,1];this.pickerOnfocus=true;this.pickerMode="HSV";this.pickerPosition="bottom";this.pickerFace=10;this.pickerFaceColor="ThreeDFace";this.pickerBorder=1;this.pickerBorderColor="ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight";this.pickerInset=1;this.pickerInsetColor="ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow";this.pickerZIndex=10000;for(var v in e){if(e.hasOwnProperty(v)){this[v]=e[v]}}this.hidePicker=function(){if(w()){g()}};this.showPicker=function(){if(!w()){var N=jscolor.getElementPos(E);var K=jscolor.getElementSize(E);var H=jscolor.getViewPos();var P=jscolor.getViewSize();var p=[2*this.pickerBorder+4*this.pickerInset+2*this.pickerFace+jscolor.images.pad[0]+2*jscolor.images.arrow[0]+jscolor.images.sld[0],2*this.pickerBorder+2*this.pickerInset+2*this.pickerFace+jscolor.images.pad[1]];var O,M,L;switch(this.pickerPosition.toLowerCase()){case"left":O=1;M=0;L=-1;break;case"right":O=1;M=0;L=1;break;case"top":O=0;M=1;L=-1;break;default:O=0;M=1;L=1;break}var J=(K[M]+p[M])/2;var I=[-H[O]+N[O]+p[O]>P[O]?(-H[O]+N[O]+K[O]/2>P[O]/2&&N[O]+K[O]-p[O]>=0?N[O]+K[O]-p[O]:N[O]):N[O],-H[M]+N[M]+K[M]+p[M]-J+J*L>P[M]?(-H[M]+N[M]+K[M]/2>P[M]/2&&N[M]+K[M]-J-J*L>=0?N[M]+K[M]-J-J*L:N[M]+K[M]-J+J*L):(N[M]+K[M]-J+J*L>=0?N[M]+K[M]-J+J*L:N[M]+K[M]-J-J*L)];k(I[O],I[M])}};this.importColor=function(){if(!b){this.exportColor()}else{if(!this.adjust){if(!this.fromString(b.value,z)){G.style.backgroundColor=G.jscStyle.backgroundColor;G.style.color=G.jscStyle.color;this.exportColor(z|F)}}else{if(!this.required&&/^\s*$/.test(b.value)){b.value="";G.style.backgroundColor=G.jscStyle.backgroundColor;G.style.color=G.jscStyle.color;this.exportColor(z|F)}else{if(this.fromString(b.value)){}else{this.exportColor()}}}}};this.exportColor=function(p){if(!(p&z)&&b){var H=this.toString();if(this.caps){H=H.toUpperCase()}if(this.hash){H="#"+H}b.value=H}if(!(p&F)&&G){G.style.backgroundColor="#"+this.toString();G.style.color=0.213*this.rgb[0]+0.715*this.rgb[1]+0.072*this.rgb[2]<0.5?"#FFF":"#000"}if(!(p&x)&&w()){u()}if(!(p&f)&&w()){D()}};this.fromHSV=function(J,I,H,p){J<0&&(J=0)||J>6&&(J=6);I<0&&(I=0)||I>1&&(I=1);H<0&&(H=0)||H>1&&(H=1);this.rgb=h(J===null?this.hsv[0]:(this.hsv[0]=J),I===null?this.hsv[1]:(this.hsv[1]=I),H===null?this.hsv[2]:(this.hsv[2]=H));this.exportColor(p)};this.fromRGB=function(K,J,p,H){K<0&&(K=0)||K>1&&(K=1);J<0&&(J=0)||J>1&&(J=1);p<0&&(p=0)||p>1&&(p=1);var I=A(K===null?this.rgb[0]:(this.rgb[0]=K),J===null?this.rgb[1]:(this.rgb[1]=J),p===null?this.rgb[2]:(this.rgb[2]=p));if(I[0]!==null){this.hsv[0]=I[0]}if(I[2]!==0){this.hsv[1]=I[1]}this.hsv[2]=I[2];this.exportColor(H)};this.fromString=function(I,H){var p=I.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);if(!p){return false}else{if(p[1].length===6){this.fromRGB(parseInt(p[1].substr(0,2),16)/255,parseInt(p[1].substr(2,2),16)/255,parseInt(p[1].substr(4,2),16)/255,H)}else{this.fromRGB(parseInt(p[1].charAt(0)+p[1].charAt(0),16)/255,parseInt(p[1].charAt(1)+p[1].charAt(1),16)/255,parseInt(p[1].charAt(2)+p[1].charAt(2),16)/255,H)}return true}};this.toString=function(){return((256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+(256|Math.round(255*this.rgb[2])).toString(16).substr(1))};function A(L,K,H){var M=Math.min(Math.min(L,K),H);var I=Math.max(Math.max(L,K),H);var p=I-M;if(p===0){return[null,0,I]}var J=L===M?3+(H-K)/p:(K===M?5+(L-H)/p:1+(K-L)/p);return[J===6?0:J,p/I,I]}function h(K,J,H){if(K===null){return[H,H,H]}var I=Math.floor(K);var L=I%2?K-I:1-(K-I);var p=H*(1-J);var M=H*(1-J*L);switch(I){case 6:case 0:return[H,M,p];case 1:return[M,H,p];case 2:return[p,H,M];case 3:return[p,M,H];case 4:return[M,p,H];case 5:return[H,p,M]}}function g(){delete jscolor.picker.owner;document.getElementsByTagName("body")[0].removeChild(jscolor.picker.boxB)}function k(H,O){if(!jscolor.picker){jscolor.picker={box:document.createElement("div"),boxB:document.createElement("div"),pad:document.createElement("div"),padB:document.createElement("div"),padM:document.createElement("div"),sld:document.createElement("div"),sldB:document.createElement("div"),sldM:document.createElement("div")};for(var K=0,N=4;K<jscolor.images.sld[1];K+=N){var I=document.createElement("div");I.style.height=N+"px";I.style.fontSize="1px";I.style.lineHeight="0";jscolor.picker.sld.appendChild(I)}jscolor.picker.sldB.appendChild(jscolor.picker.sld);jscolor.picker.box.appendChild(jscolor.picker.sldB);jscolor.picker.box.appendChild(jscolor.picker.sldM);jscolor.picker.padB.appendChild(jscolor.picker.pad);jscolor.picker.box.appendChild(jscolor.picker.padB);jscolor.picker.box.appendChild(jscolor.picker.padM);jscolor.picker.boxB.appendChild(jscolor.picker.box)}var M=jscolor.picker;r=[H+l.pickerBorder+l.pickerFace+l.pickerInset,O+l.pickerBorder+l.pickerFace+l.pickerInset];B=[null,O+l.pickerBorder+l.pickerFace+l.pickerInset];M.box.onmouseup=M.box.onmouseout=function(){E.focus()};M.box.onmousedown=function(){o=true};M.box.onmousemove=function(p){d&&y(p);q&&j(p)};M.padM.onmouseup=M.padM.onmouseout=function(){if(d){d=false;jscolor.fireEvent(b,"change")}};M.padM.onmousedown=function(p){d=true;y(p)};M.sldM.onmouseup=M.sldM.onmouseout=function(){if(q){q=false;jscolor.fireEvent(b,"change")}};M.sldM.onmousedown=function(p){q=true;j(p)};M.box.style.width=4*l.pickerInset+2*l.pickerFace+jscolor.images.pad[0]+2*jscolor.images.arrow[0]+jscolor.images.sld[0]+"px";M.box.style.height=2*l.pickerInset+2*l.pickerFace+jscolor.images.pad[1]+"px";M.boxB.style.position="absolute";M.boxB.style.clear="both";M.boxB.style.left=H+"px";M.boxB.style.top=O+"px";M.boxB.style.zIndex=l.pickerZIndex;M.boxB.style.border=l.pickerBorder+"px solid";M.boxB.style.borderColor=l.pickerBorderColor;M.boxB.style.background=l.pickerFaceColor;M.pad.style.width=jscolor.images.pad[0]+"px";M.pad.style.height=jscolor.images.pad[1]+"px";M.padB.style.position="absolute";M.padB.style.left=l.pickerFace+"px";M.padB.style.top=l.pickerFace+"px";M.padB.style.border=l.pickerInset+"px solid";M.padB.style.borderColor=l.pickerInsetColor;M.padM.style.position="absolute";M.padM.style.left="0";M.padM.style.top="0";M.padM.style.width=l.pickerFace+2*l.pickerInset+jscolor.images.pad[0]+jscolor.images.arrow[0]+"px";M.padM.style.height=M.box.style.height;M.padM.style.cursor="crosshair";M.sld.style.overflow="hidden";M.sld.style.width=jscolor.images.sld[0]+"px";M.sld.style.height=jscolor.images.sld[1]+"px";M.sldB.style.position="absolute";M.sldB.style.right=l.pickerFace+"px";M.sldB.style.top=l.pickerFace+"px";M.sldB.style.border=l.pickerInset+"px solid";M.sldB.style.borderColor=l.pickerInsetColor;M.sldM.style.position="absolute";M.sldM.style.right="0";M.sldM.style.top="0";M.sldM.style.width=jscolor.images.sld[0]+jscolor.images.arrow[0]+l.pickerFace+2*l.pickerInset+"px";M.sldM.style.height=M.box.style.height;try{M.sldM.style.cursor="pointer"}catch(J){M.sldM.style.cursor="hand"}switch(c){case 0:var L="hs.png";break;case 1:var L="hv.png";break}M.padM.style.background="url('"+jscolor.getDir()+"cross.gif') no-repeat";M.sldM.style.background="url('"+jscolor.getDir()+"arrow.gif') no-repeat";M.pad.style.background="url('"+jscolor.getDir()+L+"') 0 0 no-repeat";u();D();jscolor.picker.owner=l;document.getElementsByTagName("body")[0].appendChild(M.boxB)}function u(){switch(c){case 0:var J=1;break;case 1:var J=2;break}var N=Math.round((l.hsv[0]/6)*(jscolor.images.pad[0]-1));var M=Math.round((1-l.hsv[J])*(jscolor.images.pad[1]-1));jscolor.picker.padM.style.backgroundPosition=(l.pickerFace+l.pickerInset+N-Math.floor(jscolor.images.cross[0]/2))+"px "+(l.pickerFace+l.pickerInset+M-Math.floor(jscolor.images.cross[1]/2))+"px";var p=jscolor.picker.sld.childNodes;switch(c){case 0:var L=h(l.hsv[0],l.hsv[1],1);for(var H=0;H<p.length;H+=1){p[H].style.backgroundColor="rgb("+(L[0]*(1-H/p.length)*100)+"%,"+(L[1]*(1-H/p.length)*100)+"%,"+(L[2]*(1-H/p.length)*100)+"%)"}break;case 1:var L,O,K=[l.hsv[2],0,0];var H=Math.floor(l.hsv[0]);var I=H%2?l.hsv[0]-H:1-(l.hsv[0]-H);switch(H){case 6:case 0:L=[0,1,2];break;case 1:L=[1,0,2];break;case 2:L=[2,0,1];break;case 3:L=[2,1,0];break;case 4:L=[1,2,0];break;case 5:L=[0,2,1];break}for(var H=0;H<p.length;H+=1){O=1-1/(p.length-1)*H;K[1]=K[0]*(1-O*I);K[2]=K[0]*(1-O);p[H].style.backgroundColor="rgb("+(K[L[0]]*100)+"%,"+(K[L[1]]*100)+"%,"+(K[L[2]]*100)+"%)"}break}}function D(){switch(c){case 0:var p=2;break;case 1:var p=1;break}var H=Math.round((1-l.hsv[p])*(jscolor.images.sld[1]-1));jscolor.picker.sldM.style.backgroundPosition="0 "+(l.pickerFace+l.pickerInset+H-Math.floor(jscolor.images.arrow[1]/2))+"px"}function w(){return jscolor.picker&&jscolor.picker.owner===l}function t(){if(b===E){l.importColor()}if(l.pickerOnfocus){l.hidePicker()}}function m(){if(b!==E){l.importColor()}}function y(H){var J=jscolor.getMousePos(H);var p=J[0]-r[0];var I=J[1]-r[1];switch(c){case 0:l.fromHSV(p*(6/(jscolor.images.pad[0]-1)),1-I/(jscolor.images.pad[1]-1),null,f);break;case 1:l.fromHSV(p*(6/(jscolor.images.pad[0]-1)),null,1-I/(jscolor.images.pad[1]-1),f);break}}function j(p){var I=jscolor.getMousePos(p);var H=I[1]-r[1];switch(c){case 0:l.fromHSV(null,null,1-H/(jscolor.images.sld[1]-1),x);break;case 1:l.fromHSV(null,1-H/(jscolor.images.sld[1]-1),null,x);break}}var l=this;var c=this.pickerMode.toLowerCase()==="hvs"?1:0;var o=false;var b=jscolor.fetchElement(this.valueElement),G=jscolor.fetchElement(this.styleElement);var d=false,q=false;var r,B;var z=1<<0,F=1<<1,x=1<<2,f=1<<3;jscolor.addEvent(E,"focus",function(){if(l.pickerOnfocus){l.showPicker()}});jscolor.addEvent(E,"blur",function(){if(!o){window.setTimeout(function(){o||t();o=false},0)}else{o=false}});if(b){var C=function(){l.fromString(b.value,z)};jscolor.addEvent(b,"keyup",C);jscolor.addEvent(b,"input",C);jscolor.addEvent(b,"blur",m);b.setAttribute("autocomplete","off")}if(G){G.jscStyle={backgroundColor:G.style.backgroundColor,color:G.style.color}}switch(c){case 0:jscolor.requireImage("hs.png");break;case 1:jscolor.requireImage("hv.png");break}jscolor.requireImage("cross.gif");jscolor.requireImage("arrow.gif");this.importColor()}};jscolor.install(); 1 /** 2 * Author: noprofeed.org 3 * Date: 1 July 2011 4 */function initSliders(){var e=getElementsByAttribute("class","slider");for(var t=0;t<e.length;t++){var n=document.createElement("div"),r=document.createElement("div"),i=document.createElement("input"),s=e[t].getAttribute("id");(s!=null||s!="")&&n.setAttribute("id",s+"SliderContainer");n.className="sliderContainer";r.className="sliderWidget";r.style.left=e[t].getAttribute("value")+"px";r.valueX=parseInt(e[t].getAttribute("value"),10);try{i.setAttribute("id",e[t].getAttribute("id"));i.setAttribute("name",e[t].getAttribute("name"));i.setAttribute("type","hidden");i.setAttribute("value",e[t].getAttribute("value"))}catch(o){return!1}n.appendChild(r);e[t].parentNode.insertBefore(n,e[t]);e[t].parentNode.replaceChild(i,e[t]);n.input=i;attachEventListener(r,"mousedown",mousedownSlider,!1)}var u=document.getElementById("nop_slider_wait");u&&(u.style.display="none");return!0}function mousedownSlider(e){typeof e=="undefined"&&(e=window.event);var t=getEventTarget(e);while(!/(^| )sliderWidget( |$)/.test(t.className))t=t.parentNode;document.currentSlider=t;t.originX=e.clientX;attachEventListener(document,"mousemove",mousemoveSlider,!1);attachEventListener(document,"mouseup",mouseupSlider,!1);stopDefaultAction(e);return!0}function mousemoveSlider(e){typeof e=="undefined"&&(e=window.event);var t=document.currentSlider,n=t.valueX,r=1;isNaN(n)&&(n=0);n+=e.clientX-t.originX;n<0?n=0:n>t.parentNode.offsetWidth-t.offsetWidth?n=t.parentNode.offsetWidth-t.offsetWidth:t.originX=e.clientX;t.style.left=Math.round(n/r)*r+"px";t.parentNode.input.setAttribute("value",Math.round(n/r)*r);t.valueX=n;stopDefaultAction(e);npf_wid_setDynamicWidget(1);return!0}function mouseupSlider(){detachEventListener(document,"mousemove",mousemoveSlider,!1);detachEventListener(document,"mouseup",mouseupSlider,!1);return!0}function addLoadListener(e){if(typeof window.addEventListener!="undefined")window.addEventListener("load",e,!1);else if(typeof document.addEventListener!="undefined")document.addEventListener("load",e,!1);else if(typeof window.attachEvent!="undefined")window.attachEvent("onload",e);else{var t=window.onload;typeof window.onload!="function"?window.onload=e:window.onload=function(){t();e()}}}function attachEventListener(e,t,n,r){if(typeof e.addEventListener!="undefined")e.addEventListener(t,n,r);else if(typeof e.attachEvent!="undefined")e.attachEvent("on"+t,n);else{t="on"+t;if(typeof e[t]=="function"){var i=e[t];e[t]=function(){i();return n()}}else e[t]=n}return!0}function detachEventListener(e,t,n,r){typeof e.removeEventListener!="undefined"?e.removeEventListener(t,n,r):typeof e.detachEvent!="undefined"?e.detachEvent("on"+t,n):e["on"+t]=null;return!0}function getEventTarget(e){var t=null;typeof e.target!="undefined"?t=e.target:t=e.srcElement;while(t.nodeType==3&&t.parentNode!=null)t=t.parentNode;return t}function stopDefaultAction(e){e.returnValue=!1;typeof e.preventDefault!="undefined"&&e.preventDefault();return!0}function getElementsByAttribute(e,t){var n=new Array,r=new Array;document.all?n=document.all:n=document.getElementsByTagName("*");for(var i=0;i<n.length;i++)if(e=="class"){var s=new RegExp("(^| )"+t+"( |$)");n[i].className.match(s)&&(r[r.length]=n[i])}else e=="for"?(n[i].getAttribute("htmlFor")||n[i].getAttribute("for"))&&n[i].htmlFor==t&&(r[r.length]=n[i]):n[i].getAttribute(e)==t&&(r[r.length]=n[i]);return r}function npf_WidRating(e,t){sMax=0;for(n=0;n<e.parentNode.childNodes.length;n++)e.parentNode.childNodes[n].nodeName=="A"&&sMax++;if(!rated){s=e.id.replace("widrate"+t+"_","");a=0;for(i=1;i<=sMax;i++)if(i<=s){document.getElementById("widrate"+t+"_"+i).className="on";document.getElementById("npf-wid-rateStatus-"+t).innerHTML=e.title;holder=a+1;a++}else document.getElementById("widrate"+t+"_"+i).className=""}}function npf_WidRatingOff(e,t){if(!rated)if(!preSet)for(i=1;i<=sMax;i++){document.getElementById("widrate"+t+"_"+i).className="";document.getElementById("npf-wid-rateStatus-"+t).innerHTML=e.parentNode.title}else{npf_WidRating(preSet);document.getElementById("npf-wid-rateStatus-"+t).innerHTML=document.getElementById("npf-wid-ratingSaved-"+t).innerHTML}}function npf_WidRate(e,t){if(!rated){document.getElementById("npf-wid-rateStatus-"+t).innerHTML=document.getElementById("npf-wid-ratingSaved-"+t).innerHTML+" :: "+e.title;preSet=e;rated=1;npf_WidRatingSendRate(e,t);npf_WidRating(e,t)}}function npf_WidRatingSendRate(e){alert("Your rating was: "+e.title+"\n\nAJAX code to be implemented!")}function npf_setActualRating(e,t){for(var n=1;n<=e;n++)npf_WidRating(document.getElementById("widrate"+t+"_"+n),t)}addLoadListener(initSliders);var sMax,holder,preSet,rated,jscolorNPF={dir:"",bindClass:"nop-wid-color",binding:!0,preloading:!0,install:function(){jscolorNPF.addEvent(window,"load",jscolorNPF.init)},init:function(){jscolorNPF.binding&&jscolorNPF.bind();jscolorNPF.preloading&&jscolorNPF.preload()},getDir:function(){if(!jscolorNPF.dir){var e=jscolorNPF.detectDir();jscolorNPF.dir=e!==!1?e:"http://myeasywp.com/service/meh-img/"}return jscolorNPF.dir},detectDir:function(){var e=location.href,t=document.getElementsByTagName("base");for(var n=0;n<t.length;n+=1)t[n].href&&(e=t[n].href);var t=document.getElementsByTagName("script");for(var n=0;n<t.length;n+=1)if(t[n].src&&/(^|\/)jscolor\.js([?#].*)?$/i.test(t[n].src)){var r=new jscolorNPF.URI(t[n].src),i=r.toAbsolute(e);i.path=i.path.replace(/[^\/]+$/,"");i.query=null;i.fragment=null;return i.toString()}return!1},bind:function(){var matchClass=new RegExp("(^|\\s)("+jscolorNPF.bindClass+")\\s*(\\{[^}]*\\})?","i"),e=document.getElementsByTagName("input");for(var i=0;i<e.length;i+=1){var m;if(!e[i].color&&e[i].className&&(m=e[i].className.match(matchClass))){var prop={};if(m[3])try{eval("prop="+m[3])}catch(eInvalidProp){}e[i].color=new jscolorNPF.color(e[i],prop)}}},preload:function(){for(var e in jscolorNPF.imgRequire)jscolorNPF.imgRequire.hasOwnProperty(e)&&jscolorNPF.loadImage(e)},images:{pad:[181,101],sld:[16,101],cross:[15,15],arrow:[7,11]},imgRequire:{},imgLoaded:{},requireImage:function(e){jscolorNPF.imgRequire[e]=!0},loadImage:function(e){if(!jscolorNPF.imgLoaded[e]){jscolorNPF.imgLoaded[e]=new Image;jscolorNPF.imgLoaded[e].src=jscolorNPF.getDir()+e}},fetchElement:function(e){return typeof e=="string"?document.getElementById(e):e},addEvent:function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on"+t,n)},fireEvent:function(e,t){if(!e)return;if(document.createEventObject){var n=document.createEventObject();e.fireEvent("on"+t,n)}else if(document.createEvent){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0);e.dispatchEvent(n)}else e["on"+t]&&e["on"+t]()},getElementPos:function(e){var t=e,n=e,r=0,i=0;if(t.offsetParent)do{r+=t.offsetLeft;i+=t.offsetTop}while(t=t.offsetParent);while((n=n.parentNode)&&n.nodeName.toUpperCase()!=="BODY"){r-=n.scrollLeft;i-=n.scrollTop}return[r,i]},getElementSize:function(e){return[e.offsetWidth,e.offsetHeight]},getMousePos:function(e){e||(e=window.event);if(typeof e.pageX=="number")return[e.pageX,e.pageY];if(typeof e.clientX=="number")return[e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,e.clientY+document.body.scrollTop+document.documentElement.scrollTop]},getViewPos:function(){return typeof window.pageYOffset=="number"?[window.pageXOffset,window.pageYOffset]:document.body&&(document.body.scrollLeft||document.body.scrollTop)?[document.body.scrollLeft,document.body.scrollTop]:document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)?[document.documentElement.scrollLeft,document.documentElement.scrollTop]:[0,0]},getViewSize:function(){return typeof window.innerWidth=="number"?[window.innerWidth,window.innerHeight]:document.body&&(document.body.clientWidth||document.body.clientHeight)?[document.body.clientWidth,document.body.clientHeight]:document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)?[document.documentElement.clientWidth,document.documentElement.clientHeight]:[0,0]},URI:function(e){function t(e){var t="";while(e)if(e.substr(0,3)==="../"||e.substr(0,2)==="./")e=e.replace(/^\.+/,"").substr(1);else if(e.substr(0,3)==="/./"||e==="/.")e="/"+e.substr(3);else if(e.substr(0,4)==="/../"||e==="/.."){e="/"+e.substr(4);t=t.replace(/\/?[^\/]*$/,"")}else if(e==="."||e==="..")e="";else{var n=e.match(/^\/?[^\/]*/)[0];e=e.substr(n.length);t+=n}return t}this.scheme=null;this.authority=null;this.path="";this.query=null;this.fragment=null;this.parse=function(e){var t=e.match(/^(([A-Za-z][0-9A-Za-z+.-]*)(:))?((\/\/)([^\/?#]*))?([^?#]*)((\?)([^#]*))?((#)(.*))?/);this.scheme=t[3]?t[2]:null;this.authority=t[5]?t[6]:null;this.path=t[7];this.query=t[9]?t[10]:null;this.fragment=t[12]?t[13]:null;return this};this.toString=function(){var e="";this.scheme!==null&&(e=e+this.scheme+":");this.authority!==null&&(e=e+"//"+this.authority);this.path!==null&&(e+=this.path);this.query!==null&&(e=e+"?"+this.query);this.fragment!==null&&(e=e+"#"+this.fragment);return e};this.toAbsolute=function(e){var e=new jscolorNPF.URI(e),n=this,r=new jscolorNPF.URI;if(e.scheme===null)return!1;n.scheme!==null&&n.scheme.toLowerCase()===e.scheme.toLowerCase()&&(n.scheme=null);if(n.scheme!==null){r.scheme=n.scheme;r.authority=n.authority;r.path=t(n.path);r.query=n.query}else{if(n.authority!==null){r.authority=n.authority;r.path=t(n.path);r.query=n.query}else{if(n.path===""){r.path=e.path;n.query!==null?r.query=n.query:r.query=e.query}else{if(n.path.substr(0,1)==="/")r.path=t(n.path);else{e.authority!==null&&e.path===""?r.path="/"+n.path:r.path=e.path.replace(/[^\/]+$/,"")+n.path;r.path=t(r.path)}r.query=n.query}r.authority=e.authority}r.scheme=e.scheme}r.fragment=n.fragment;return r};e&&this.parse(e)},color:function(e,t){function r(e,t,n){var r=Math.min(Math.min(e,t),n),i=Math.max(Math.max(e,t),n),s=i-r;if(s===0)return[null,0,i];var o=e===r?3+(n-t)/s:t===r?5+(e-n)/s:1+(t-e)/s;return[o===6?0:o,s/i,i]}function i(e,t,n){if(e===null)return[n,n,n];var r=Math.floor(e),i=r%2?e-r:1-(e-r),s=n*(1-t),o=n*(1-t*i);switch(r){case 6:case 0:return[n,o,s];case 1:return[o,n,s];case 2:return[s,n,o];case 3:return[s,o,n];case 4:return[o,s,n];case 5:return[n,s,o]}}function s(){delete jscolorNPF.picker.owner;document.getElementsByTagName("body")[0].removeChild(jscolorNPF.picker.boxB)}function o(t,n){if(!jscolorNPF.picker){jscolorNPF.picker={box:document.createElement("div"),boxB:document.createElement("div"),pad:document.createElement("div"),padB:document.createElement("div"),padM:document.createElement("div"),sld:document.createElement("div"),sldB:document.createElement("div"),sldM:document.createElement("div")};for(var r=0,i=4;r<jscolorNPF.images.sld[1];r+=i){var s=document.createElement("div");s.style.height=i+"px";s.style.fontSize="1px";s.style.lineHeight="0";jscolorNPF.picker.sld.appendChild(s)}jscolorNPF.picker.sldB.appendChild(jscolorNPF.picker.sld);jscolorNPF.picker.box.appendChild(jscolorNPF.picker.sldB);jscolorNPF.picker.box.appendChild(jscolorNPF.picker.sldM);jscolorNPF.picker.padB.appendChild(jscolorNPF.picker.pad);jscolorNPF.picker.box.appendChild(jscolorNPF.picker.padB);jscolorNPF.picker.box.appendChild(jscolorNPF.picker.padM);jscolorNPF.picker.boxB.appendChild(jscolorNPF.picker.box)}var o=jscolorNPF.picker;E=[t+d.pickerBorder+d.pickerFace+d.pickerInset,n+d.pickerBorder+d.pickerFace+d.pickerInset];S=[null,n+d.pickerBorder+d.pickerFace+d.pickerInset];o.box.onmouseup=o.box.onmouseout=function(){e.focus()};o.box.onmousedown=function(){m=!0};o.box.onmousemove=function(e){b&&h(e);w&&p(e)};o.padM.onmouseup=o.padM.onmouseout=function(){if(b){b=!1;jscolorNPF.fireEvent(g,"change")}};o.padM.onmousedown=function(e){b=!0;h(e)};o.sldM.onmouseup=o.sldM.onmouseout=function(){if(w){w=!1;jscolorNPF.fireEvent(g,"change")}};o.sldM.onmousedown=function(e){w=!0;p(e)};o.box.style.width=4*d.pickerInset+2*d.pickerFace+jscolorNPF.images.pad[0]+2*jscolorNPF.images.arrow[0]+jscolorNPF.images.sld[0]+"px";o.box.style.height=2*d.pickerInset+2*d.pickerFace+jscolorNPF.images.pad[1]+"px";o.boxB.style.position="absolute";o.boxB.style.clear="both";o.boxB.style.left=t+"px";o.boxB.style.top=n+"px";o.boxB.style.zIndex=d.pickerZIndex;o.boxB.style.border=d.pickerBorder+"px solid";o.boxB.style.borderColor=d.pickerBorderColor;o.boxB.style.background=d.pickerFaceColor;o.pad.style.width=jscolorNPF.images.pad[0]+"px";o.pad.style.height=jscolorNPF.images.pad[1]+"px";o.padB.style.position="absolute";o.padB.style.left=d.pickerFace+"px";o.padB.style.top=d.pickerFace+"px";o.padB.style.border=d.pickerInset+"px solid";o.padB.style.borderColor=d.pickerInsetColor;o.padM.style.position="absolute";o.padM.style.left="0";o.padM.style.top="0";o.padM.style.width=d.pickerFace+2*d.pickerInset+jscolorNPF.images.pad[0]+jscolorNPF.images.arrow[0]+"px";o.padM.style.height=o.box.style.height;o.padM.style.cursor="crosshair";o.sld.style.overflow="hidden";o.sld.style.width=jscolorNPF.images.sld[0]+"px";o.sld.style.height=jscolorNPF.images.sld[1]+"px";o.sldB.style.position="absolute";o.sldB.style.right=d.pickerFace+"px";o.sldB.style.top=d.pickerFace+"px";o.sldB.style.border=d.pickerInset+"px solid";o.sldB.style.borderColor=d.pickerInsetColor;o.sldM.style.position="absolute";o.sldM.style.right="0";o.sldM.style.top="0";o.sldM.style.width=jscolorNPF.images.sld[0]+jscolorNPF.images.arrow[0]+d.pickerFace+2*d.pickerInset+"px";o.sldM.style.height=o.box.style.height;try{o.sldM.style.cursor="pointer"}catch(f){o.sldM.style.cursor="hand"}switch(v){case 0:var l="hs.png";break;case 1:var l="hv.png"}o.padM.style.background="url('"+jscolorNPF.getDir()+"cross.gif') no-repeat";o.sldM.style.background="url('"+jscolorNPF.getDir()+"arrow.gif') no-repeat";o.pad.style.background="url('"+jscolorNPF.getDir()+l+"') 0 0 no-repeat";u();a();jscolorNPF.picker.owner=d;document.getElementsByTagName("body")[0].appendChild(o.boxB)}function u(){switch(v){case 0:var e=1;break;case 1:var e=2}var t=Math.round(d.hsv[0]/6*(jscolorNPF.images.pad[0]-1)),n=Math.round((1-d.hsv[e])*(jscolorNPF.images.pad[1]-1));jscolorNPF.picker.padM.style.backgroundPosition=d.pickerFace+d.pickerInset+t-Math.floor(jscolorNPF.images.cross[0]/2)+"px "+(d.pickerFace+d.pickerInset+n-Math.floor(jscolorNPF.images.cross[1]/2))+"px";var r=jscolorNPF.picker.sld.childNodes;switch(v){case 0:var s=i(d.hsv[0],d.hsv[1],1);for(var o=0;o<r.length;o+=1)r[o].style.backgroundColor="rgb("+s[0]*(1-o/r.length)*100+"%,"+s[1]*(1-o/r.length)*100+"%,"+s[2]*(1-o/r.length)*100+"%)";break;case 1:var s,u,a=[d.hsv[2],0,0],o=Math.floor(d.hsv[0]),f=o%2?d.hsv[0]-o:1-(d.hsv[0]-o);switch(o){case 6:case 0:s=[0,1,2];break;case 1:s=[1,0,2];break;case 2:s=[2,0,1];break;case 3:s=[2,1,0];break;case 4:s=[1,2,0];break;case 5:s=[0,2,1]}for(var o=0;o<r.length;o+=1){u=1-1/(r.length-1)*o;a[1]=a[0]*(1-u*f);a[2]=a[0]*(1-u);r[o].style.backgroundColor="rgb("+a[s[0]]*100+"%,"+a[s[1]]*100+"%,"+a[s[2]]*100+"%)"}}}function a(){switch(v){case 0:var e=2;break;case 1:var e=1}var t=Math.round((1-d.hsv[e])*(jscolorNPF.images.sld[1]-1));jscolorNPF.picker.sldM.style.backgroundPosition="0 "+(d.pickerFace+d.pickerInset+t-Math.floor(jscolorNPF.images.arrow[1]/2))+"px"}function f(){return jscolorNPF.picker&&jscolorNPF.picker.owner===d}function l(){g===e&&d.importColor();d.pickerOnfocus&&d.hidePicker()}function c(){g!==e&&d.importColor()}function h(e){var t=jscolorNPF.getMousePos(e),n=t[0]-E[0],r=t[1]-E[1];switch(v){case 0:d.fromHSV(n*(6/(jscolorNPF.images.pad[0]-1)),1-r/(jscolorNPF.images.pad[1]-1),null,C);break;case 1:d.fromHSV(n*(6/(jscolorNPF.images.pad[0]-1)),null,1-r/(jscolorNPF.images.pad[1]-1),C)}}function p(e){var t=jscolorNPF.getMousePos(e),n=t[1]-E[1];switch(v){case 0:d.fromHSV(null,null,1-n/(jscolorNPF.images.sld[1]-1),N);break;case 1:d.fromHSV(null,1-n/(jscolorNPF.images.sld[1]-1),null,N)}}this.required=!0;this.adjust=!0;this.hash=!1;this.caps=!0;this.valueElement=e;this.styleElement=e;this.hsv=[0,0,1];this.rgb=[1,1,1];this.pickerOnfocus=!0;this.pickerMode="HSV";this.pickerPosition="bottom";this.pickerFace=10;this.pickerFaceColor="ThreeDFace";this.pickerBorder=1;this.pickerBorderColor="ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight";this.pickerInset=1;this.pickerInsetColor="ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow";this.pickerZIndex=1e4;for(var n in t)t.hasOwnProperty(n)&&(this[n]=t[n]);this.hidePicker=function(){f()&&s()};this.showPicker=function(){if(!f()){var t=jscolorNPF.getElementPos(e),n=jscolorNPF.getElementSize(e),r=jscolorNPF.getViewPos(),i=jscolorNPF.getViewSize(),s=[2*this.pickerBorder+4*this.pickerInset+2*this.pickerFace+jscolorNPF.images.pad[0]+2*jscolorNPF.images.arrow[0]+jscolorNPF.images.sld[0],2*this.pickerBorder+2*this.pickerInset+2*this.pickerFace+jscolorNPF.images.pad[1]],u,a,l;switch(this.pickerPosition.toLowerCase()){case"left":u=1;a=0;l=-1;break;case"right":u=1;a=0;l=1;break;case"top":u=0;a=1;l=-1;break;default:u=0;a=1;l=1}var c=(n[a]+s[a])/2,h=[-r[u]+t[u]+s[u]>i[u]?-r[u]+t[u]+n[u]/2>i[u]/2&&t[u]+n[u]-s[u]>=0?t[u]+n[u]-s[u]:t[u]:t[u],-r[a]+t[a]+n[a]+s[a]-c+c*l>i[a]?-r[a]+t[a]+n[a]/2>i[a]/2&&t[a]+n[a]-c-c*l>=0?t[a]+n[a]-c-c*l:t[a]+n[a]-c+c*l:t[a]+n[a]-c+c*l>=0?t[a]+n[a]-c+c*l:t[a]+n[a]-c-c*l];o(h[u],h[a])}};this.importColor=function(){if(!g)this.exportColor();else if(!this.adjust){if(!this.fromString(g.value,x)){y.style.backgroundColor=y.jscStyle.backgroundColor;y.style.color=y.jscStyle.color;this.exportColor(x|T)}}else if(!this.required&&/^\s*$/.test(g.value)){g.value="";y.style.backgroundColor=y.jscStyle.backgroundColor;y.style.color=y.jscStyle.color;this.exportColor(x|T)}else this.fromString(g.value)||this.exportColor()};this.exportColor=function(e){if(!(e&x)&&g){var t=this.toString();this.caps&&(t=t.toUpperCase());this.hash&&(t="#"+t);g.value=t}if(!(e&T)&&y){y.style.backgroundColor="#"+this.toString();y.style.color=.213*this.rgb[0]+.715*this.rgb[1]+.072*this.rgb[2]<.5?"#FFF":"#000"}!(e&N)&&f()&&u();!(e&C)&&f()&&a()};this.fromHSV=function(e,t,n,r){e<0&&(e=0)||e>6&&(e=6);t<0&&(t=0)||t>1&&(t=1);n<0&&(n=0)||n>1&&(n=1);this.rgb=i(e===null?this.hsv[0]:this.hsv[0]=e,t===null?this.hsv[1]:this.hsv[1]=t,n===null?this.hsv[2]:this.hsv[2]=n);this.exportColor(r)};this.fromRGB=function(e,t,n,i){e<0&&(e=0)||e>1&&(e=1);t<0&&(t=0)||t>1&&(t=1);n<0&&(n=0)||n>1&&(n=1);var s=r(e===null?this.rgb[0]:this.rgb[0]=e,t===null?this.rgb[1]:this.rgb[1]=t,n===null?this.rgb[2]:this.rgb[2]=n);s[0]!==null&&(this.hsv[0]=s[0]);s[2]!==0&&(this.hsv[1]=s[1]);this.hsv[2]=s[2];this.exportColor(i)};this.fromString=function(e,t){var n=e.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);if(!n)return!1;n[1].length===6?this.fromRGB(parseInt(n[1].substr(0,2),16)/255,parseInt(n[1].substr(2,2),16)/255,parseInt(n[1].substr(4,2),16)/255,t):this.fromRGB(parseInt(n[1].charAt(0)+n[1].charAt(0),16)/255,parseInt(n[1].charAt(1)+n[1].charAt(1),16)/255,parseInt(n[1].charAt(2)+n[1].charAt(2),16)/255,t);return!0};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var d=this,v=this.pickerMode.toLowerCase()==="hvs"?1:0,m=!1,g=jscolorNPF.fetchElement(this.valueElement),y=jscolorNPF.fetchElement(this.styleElement),b=!1,w=!1,E,S,x=1,T=2,N=4,C=8;jscolorNPF.addEvent(e,"focus",function(){d.pickerOnfocus&&d.showPicker()});jscolorNPF.addEvent(e,"blur",function(){m?m=!1:window.setTimeout(function(){m||l();m=!1},0)});if(g){var k=function(){d.fromString(g.value,x)};jscolorNPF.addEvent(g,"keyup",k);jscolorNPF.addEvent(g,"input",k);jscolorNPF.addEvent(g,"blur",c);g.setAttribute("autocomplete","off")}y&&(y.jscStyle={backgroundColor:y.style.backgroundColor,color:y.style.color});switch(v){case 0:jscolorNPF.requireImage("hs.png");break;case 1:jscolorNPF.requireImage("hv.png")}jscolorNPF.requireImage("cross.gif");jscolorNPF.requireImage("arrow.gif");this.importColor()}};setTimeout(function(){jscolorNPF.install()},500); -
noprofeedorg/trunk/js/src/myeasywp.dev.js
r414440 r640433 2 2 * myeasywp.com 3 3 * settings 4 * 24 July20124 * 17 December 2012 5 5 */ 6 6 function toggleOptions(id) { … … 22 22 } 23 23 24 if( $) {24 if(jQuery) { 25 25 26 $(document).ready(function() {26 jQuery(document).ready(function() { 27 27 28 $('#signup').submit(function() {28 jQuery('#signup').submit(function() { 29 29 30 $('#mc-response').html('Adding email address...');30 jQuery('#mc-response').html('Adding email address...'); 31 31 32 $.ajax({32 jQuery.ajax({ 33 33 34 34 url: location.protocol+'//'+location.hostname+'/wp-content/plugins/'+myeasyplugin+'/inc/mc/inc/store-address.php', 35 data: 'ajax=true&email=' + escape( $('#email').val()),35 data: 'ajax=true&email=' + escape(jQuery('#email').val()), 36 36 success: function(msg) { 37 $('#mc-response').html(msg);37 jQuery('#mc-response').html(msg); 38 38 } 39 39 }); -
noprofeedorg/trunk/js/src/npf-rating.dev.js
r403247 r640433 23 23 } 24 24 } 25 25 26 26 if(!rated) { 27 27 -
noprofeedorg/trunk/js/src/npf-wid.dev.js
r403247 r640433 395 395 * @created 2008-06-15 396 396 * @updated 2010-01-23 397 * @link http://jscolor .com397 * @link http://jscolorNPF.com 398 398 */ 399 399 400 var jscolor = {400 var jscolorNPF = { 401 401 402 402 … … 408 408 409 409 install : function() { 410 jscolor .addEvent(window, 'load', jscolor.init);410 jscolorNPF.addEvent(window, 'load', jscolorNPF.init); 411 411 }, 412 412 413 413 414 414 init : function() { 415 if(jscolor .binding) {416 jscolor .bind();417 } 418 if(jscolor .preloading) {419 jscolor .preload();415 if(jscolorNPF.binding) { 416 jscolorNPF.bind(); 417 } 418 if(jscolorNPF.preloading) { 419 jscolorNPF.preload(); 420 420 } 421 421 }, … … 423 423 424 424 getDir : function() { 425 if(!jscolor .dir) {426 var detected = jscolor .detectDir();425 if(!jscolorNPF.dir) { 426 var detected = jscolorNPF.detectDir(); 427 427 /* camaleo: beg */ 428 //jscolor .dir = detected!==false ? detected : 'jscolor/';429 jscolor .dir = detected!==false ? detected : 'http://myeasywp.com/service/meh-img/';428 //jscolorNPF.dir = detected!==false ? detected : 'jscolor/'; 429 jscolorNPF.dir = detected!==false ? detected : 'http://myeasywp.com/service/meh-img/'; 430 430 /* camaleo: end */ 431 431 } 432 432 433 return jscolor .dir;433 return jscolorNPF.dir; 434 434 }, 435 435 … … 446 446 for(var i=0; i<e.length; i+=1) { 447 447 if(e[i].src && /(^|\/)jscolor\.js([?#].*)?$/i.test(e[i].src)) { 448 var src = new jscolor .URI(e[i].src);448 var src = new jscolorNPF.URI(e[i].src); 449 449 var srcAbs = src.toAbsolute(base); 450 450 srcAbs.path = srcAbs.path.replace(/[^\/]+$/, ''); // remove filename … … 459 459 460 460 bind : function() { 461 var matchClass = new RegExp('(^|\\s)('+jscolor .bindClass+')\\s*(\\{[^}]*\\})?', 'i');461 var matchClass = new RegExp('(^|\\s)('+jscolorNPF.bindClass+')\\s*(\\{[^}]*\\})?', 'i'); 462 462 var e = document.getElementsByTagName('input'); 463 463 for(var i=0; i<e.length; i+=1) { … … 470 470 } catch(eInvalidProp) {} 471 471 } 472 e[i].color = new jscolor .color(e[i], prop);472 e[i].color = new jscolorNPF.color(e[i], prop); 473 473 } 474 474 } … … 477 477 478 478 preload : function() { 479 for(var fn in jscolor .imgRequire) {480 if(jscolor .imgRequire.hasOwnProperty(fn)) {481 jscolor .loadImage(fn);479 for(var fn in jscolorNPF.imgRequire) { 480 if(jscolorNPF.imgRequire.hasOwnProperty(fn)) { 481 jscolorNPF.loadImage(fn); 482 482 } 483 483 } … … 498 498 499 499 requireImage : function(filename) { 500 jscolor .imgRequire[filename] = true;500 jscolorNPF.imgRequire[filename] = true; 501 501 }, 502 502 503 503 504 504 loadImage : function(filename) { 505 if(!jscolor .imgLoaded[filename]) {506 jscolor .imgLoaded[filename] = new Image();507 jscolor .imgLoaded[filename].src = jscolor.getDir()+filename;505 if(!jscolorNPF.imgLoaded[filename]) { 506 jscolorNPF.imgLoaded[filename] = new Image(); 507 jscolorNPF.imgLoaded[filename].src = jscolorNPF.getDir()+filename; 508 508 } 509 509 }, … … 631 631 632 632 this.toAbsolute = function(base) { 633 var base = new jscolor .URI(base);633 var base = new jscolorNPF.URI(base); 634 634 var r = this; 635 var t = new jscolor .URI;635 var t = new jscolorNPF.URI; 636 636 637 637 if(base.scheme === null) { return false; } … … 711 711 /* 712 712 * Usage example: 713 * var myColor = new jscolor .color(myInputElement)713 * var myColor = new jscolorNPF.color(myInputElement) 714 714 */ 715 715 … … 754 754 this.showPicker = function() { 755 755 if(!isPickerOwner()) { 756 var tp = jscolor .getElementPos(target); // target pos757 var ts = jscolor .getElementSize(target); // target size758 var vp = jscolor .getViewPos(); // view pos759 var vs = jscolor .getViewSize(); // view size756 var tp = jscolorNPF.getElementPos(target); // target pos 757 var ts = jscolorNPF.getElementSize(target); // target size 758 var vp = jscolorNPF.getViewPos(); // view pos 759 var vs = jscolorNPF.getViewSize(); // view size 760 760 var ps = [ // picker size 761 2*this.pickerBorder + 4*this.pickerInset + 2*this.pickerFace + jscolor .images.pad[0] + 2*jscolor.images.arrow[0] + jscolor.images.sld[0],762 2*this.pickerBorder + 2*this.pickerInset + 2*this.pickerFace + jscolor .images.pad[1]761 2*this.pickerBorder + 4*this.pickerInset + 2*this.pickerFace + jscolorNPF.images.pad[0] + 2*jscolorNPF.images.arrow[0] + jscolorNPF.images.sld[0], 762 2*this.pickerBorder + 2*this.pickerInset + 2*this.pickerFace + jscolorNPF.images.pad[1] 763 763 ]; 764 764 var a, b, c; … … 929 929 930 930 function removePicker() { 931 delete jscolor .picker.owner;932 document.getElementsByTagName('body')[0].removeChild(jscolor .picker.boxB);931 delete jscolorNPF.picker.owner; 932 document.getElementsByTagName('body')[0].removeChild(jscolorNPF.picker.boxB); 933 933 } 934 934 935 935 936 936 function drawPicker(x, y) { 937 if(!jscolor .picker) {938 jscolor .picker = {937 if(!jscolorNPF.picker) { 938 jscolorNPF.picker = { 939 939 box : document.createElement('div'), 940 940 boxB : document.createElement('div'), … … 946 946 sldM : document.createElement('div') 947 947 }; 948 for(var i=0,segSize=4; i<jscolor .images.sld[1]; i+=segSize) {948 for(var i=0,segSize=4; i<jscolorNPF.images.sld[1]; i+=segSize) { 949 949 var seg = document.createElement('div'); 950 950 seg.style.height = segSize+'px'; 951 951 seg.style.fontSize = '1px'; 952 952 seg.style.lineHeight = '0'; 953 jscolor .picker.sld.appendChild(seg);953 jscolorNPF.picker.sld.appendChild(seg); 954 954 } 955 jscolor .picker.sldB.appendChild(jscolor.picker.sld);956 jscolor .picker.box.appendChild(jscolor.picker.sldB);957 jscolor .picker.box.appendChild(jscolor.picker.sldM);958 jscolor .picker.padB.appendChild(jscolor.picker.pad);959 jscolor .picker.box.appendChild(jscolor.picker.padB);960 jscolor .picker.box.appendChild(jscolor.picker.padM);961 jscolor .picker.boxB.appendChild(jscolor.picker.box);962 } 963 964 var p = jscolor .picker;955 jscolorNPF.picker.sldB.appendChild(jscolorNPF.picker.sld); 956 jscolorNPF.picker.box.appendChild(jscolorNPF.picker.sldB); 957 jscolorNPF.picker.box.appendChild(jscolorNPF.picker.sldM); 958 jscolorNPF.picker.padB.appendChild(jscolorNPF.picker.pad); 959 jscolorNPF.picker.box.appendChild(jscolorNPF.picker.padB); 960 jscolorNPF.picker.box.appendChild(jscolorNPF.picker.padM); 961 jscolorNPF.picker.boxB.appendChild(jscolorNPF.picker.box); 962 } 963 964 var p = jscolorNPF.picker; 965 965 966 966 // recompute controls positions … … 978 978 p.box.onmousemove = function(e) { holdPad && setPad(e); holdSld && setSld(e); }; 979 979 p.padM.onmouseup = 980 p.padM.onmouseout = function() { if(holdPad) { holdPad=false; jscolor .fireEvent(valueElement,'change'); } };980 p.padM.onmouseout = function() { if(holdPad) { holdPad=false; jscolorNPF.fireEvent(valueElement,'change'); } }; 981 981 p.padM.onmousedown = function(e) { holdPad=true; setPad(e); }; 982 982 p.sldM.onmouseup = 983 p.sldM.onmouseout = function() { if(holdSld) { holdSld=false; jscolor .fireEvent(valueElement,'change'); } };983 p.sldM.onmouseout = function() { if(holdSld) { holdSld=false; jscolorNPF.fireEvent(valueElement,'change'); } }; 984 984 p.sldM.onmousedown = function(e) { holdSld=true; setSld(e); }; 985 985 986 986 // picker 987 p.box.style.width = 4*THIS.pickerInset + 2*THIS.pickerFace + jscolor .images.pad[0] + 2*jscolor.images.arrow[0] + jscolor.images.sld[0] + 'px';988 p.box.style.height = 2*THIS.pickerInset + 2*THIS.pickerFace + jscolor .images.pad[1] + 'px';987 p.box.style.width = 4*THIS.pickerInset + 2*THIS.pickerFace + jscolorNPF.images.pad[0] + 2*jscolorNPF.images.arrow[0] + jscolorNPF.images.sld[0] + 'px'; 988 p.box.style.height = 2*THIS.pickerInset + 2*THIS.pickerFace + jscolorNPF.images.pad[1] + 'px'; 989 989 990 990 // picker border … … 999 999 1000 1000 // pad image 1001 p.pad.style.width = jscolor .images.pad[0]+'px';1002 p.pad.style.height = jscolor .images.pad[1]+'px';1001 p.pad.style.width = jscolorNPF.images.pad[0]+'px'; 1002 p.pad.style.height = jscolorNPF.images.pad[1]+'px'; 1003 1003 1004 1004 // pad border … … 1013 1013 p.padM.style.left = '0'; 1014 1014 p.padM.style.top = '0'; 1015 p.padM.style.width = THIS.pickerFace + 2*THIS.pickerInset + jscolor .images.pad[0] + jscolor.images.arrow[0] + 'px';1015 p.padM.style.width = THIS.pickerFace + 2*THIS.pickerInset + jscolorNPF.images.pad[0] + jscolorNPF.images.arrow[0] + 'px'; 1016 1016 p.padM.style.height = p.box.style.height; 1017 1017 p.padM.style.cursor = 'crosshair'; … … 1019 1019 // slider image 1020 1020 p.sld.style.overflow = 'hidden'; 1021 p.sld.style.width = jscolor .images.sld[0]+'px';1022 p.sld.style.height = jscolor .images.sld[1]+'px';1021 p.sld.style.width = jscolorNPF.images.sld[0]+'px'; 1022 p.sld.style.height = jscolorNPF.images.sld[1]+'px'; 1023 1023 1024 1024 // slider border … … 1033 1033 p.sldM.style.right = '0'; 1034 1034 p.sldM.style.top = '0'; 1035 p.sldM.style.width = jscolor .images.sld[0] + jscolor.images.arrow[0] + THIS.pickerFace + 2*THIS.pickerInset + 'px';1035 p.sldM.style.width = jscolorNPF.images.sld[0] + jscolorNPF.images.arrow[0] + THIS.pickerFace + 2*THIS.pickerInset + 'px'; 1036 1036 p.sldM.style.height = p.box.style.height; 1037 1037 try { … … 1046 1046 case 1: var padImg = 'hv.png'; break; 1047 1047 } 1048 p.padM.style.background = "url('"+jscolor .getDir()+"cross.gif') no-repeat";1049 p.sldM.style.background = "url('"+jscolor .getDir()+"arrow.gif') no-repeat";1050 p.pad.style.background = "url('"+jscolor .getDir()+padImg+"') 0 0 no-repeat";1048 p.padM.style.background = "url('"+jscolorNPF.getDir()+"cross.gif') no-repeat"; 1049 p.sldM.style.background = "url('"+jscolorNPF.getDir()+"arrow.gif') no-repeat"; 1050 p.pad.style.background = "url('"+jscolorNPF.getDir()+padImg+"') 0 0 no-repeat"; 1051 1051 1052 1052 // place pointers … … 1054 1054 redrawSld(); 1055 1055 1056 jscolor .picker.owner = THIS;1056 jscolorNPF.picker.owner = THIS; 1057 1057 document.getElementsByTagName('body')[0].appendChild(p.boxB); 1058 1058 } … … 1065 1065 case 1: var yComponent = 2; break; 1066 1066 } 1067 var x = Math.round((THIS.hsv[0]/6) * (jscolor .images.pad[0]-1));1068 var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor .images.pad[1]-1));1069 jscolor .picker.padM.style.backgroundPosition =1070 (THIS.pickerFace+THIS.pickerInset+x - Math.floor(jscolor .images.cross[0]/2)) + 'px ' +1071 (THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor .images.cross[1]/2)) + 'px';1067 var x = Math.round((THIS.hsv[0]/6) * (jscolorNPF.images.pad[0]-1)); 1068 var y = Math.round((1-THIS.hsv[yComponent]) * (jscolorNPF.images.pad[1]-1)); 1069 jscolorNPF.picker.padM.style.backgroundPosition = 1070 (THIS.pickerFace+THIS.pickerInset+x - Math.floor(jscolorNPF.images.cross[0]/2)) + 'px ' + 1071 (THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolorNPF.images.cross[1]/2)) + 'px'; 1072 1072 1073 1073 // redraw the slider image 1074 var seg = jscolor .picker.sld.childNodes;1074 var seg = jscolorNPF.picker.sld.childNodes; 1075 1075 1076 1076 switch(modeID) { … … 1117 1117 case 1: var yComponent = 1; break; 1118 1118 } 1119 var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor .images.sld[1]-1));1120 jscolor .picker.sldM.style.backgroundPosition =1121 '0 ' + (THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor .images.arrow[1]/2)) + 'px';1119 var y = Math.round((1-THIS.hsv[yComponent]) * (jscolorNPF.images.sld[1]-1)); 1120 jscolorNPF.picker.sldM.style.backgroundPosition = 1121 '0 ' + (THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolorNPF.images.arrow[1]/2)) + 'px'; 1122 1122 } 1123 1123 1124 1124 1125 1125 function isPickerOwner() { 1126 return jscolor .picker && jscolor.picker.owner === THIS;1126 return jscolorNPF.picker && jscolorNPF.picker.owner === THIS; 1127 1127 } 1128 1128 … … 1146 1146 1147 1147 function setPad(e) { 1148 var posM = jscolor .getMousePos(e);1148 var posM = jscolorNPF.getMousePos(e); 1149 1149 var x = posM[0]-posPad[0]; 1150 1150 var y = posM[1]-posPad[1]; 1151 1151 switch(modeID) { 1152 case 0: THIS.fromHSV(x*(6/(jscolor .images.pad[0]-1)), 1 - y/(jscolor.images.pad[1]-1), null, leaveSld); break;1153 case 1: THIS.fromHSV(x*(6/(jscolor .images.pad[0]-1)), null, 1 - y/(jscolor.images.pad[1]-1), leaveSld); break;1152 case 0: THIS.fromHSV(x*(6/(jscolorNPF.images.pad[0]-1)), 1 - y/(jscolorNPF.images.pad[1]-1), null, leaveSld); break; 1153 case 1: THIS.fromHSV(x*(6/(jscolorNPF.images.pad[0]-1)), null, 1 - y/(jscolorNPF.images.pad[1]-1), leaveSld); break; 1154 1154 } 1155 1155 } … … 1157 1157 1158 1158 function setSld(e) { 1159 var posM = jscolor .getMousePos(e);1159 var posM = jscolorNPF.getMousePos(e); 1160 1160 var y = posM[1]-posPad[1]; 1161 1161 switch(modeID) { 1162 case 0: THIS.fromHSV(null, null, 1 - y/(jscolor .images.sld[1]-1), leavePad); break;1163 case 1: THIS.fromHSV(null, 1 - y/(jscolor .images.sld[1]-1), null, leavePad); break;1162 case 0: THIS.fromHSV(null, null, 1 - y/(jscolorNPF.images.sld[1]-1), leavePad); break; 1163 case 1: THIS.fromHSV(null, 1 - y/(jscolorNPF.images.sld[1]-1), null, leavePad); break; 1164 1164 } 1165 1165 } … … 1170 1170 var abortBlur = false; 1171 1171 var 1172 valueElement = jscolor .fetchElement(this.valueElement),1173 styleElement = jscolor .fetchElement(this.styleElement);1172 valueElement = jscolorNPF.fetchElement(this.valueElement), 1173 styleElement = jscolorNPF.fetchElement(this.styleElement); 1174 1174 var 1175 1175 holdPad = false, … … 1185 1185 1186 1186 // target 1187 jscolor .addEvent(target, 'focus', function() {1187 jscolorNPF.addEvent(target, 'focus', function() { 1188 1188 if(THIS.pickerOnfocus) { THIS.showPicker(); } 1189 1189 }); 1190 jscolor .addEvent(target, 'blur', function() {1190 jscolorNPF.addEvent(target, 'blur', function() { 1191 1191 if(!abortBlur) { 1192 1192 window.setTimeout(function(){ abortBlur || blurTarget(); abortBlur=false; }, 0); … … 1201 1201 THIS.fromString(valueElement.value, leaveValue); 1202 1202 }; 1203 jscolor .addEvent(valueElement, 'keyup', updateField);1204 jscolor .addEvent(valueElement, 'input', updateField);1205 jscolor .addEvent(valueElement, 'blur', blurValue);1203 jscolorNPF.addEvent(valueElement, 'keyup', updateField); 1204 jscolorNPF.addEvent(valueElement, 'input', updateField); 1205 jscolorNPF.addEvent(valueElement, 'blur', blurValue); 1206 1206 valueElement.setAttribute('autocomplete', 'off'); 1207 1207 } … … 1217 1217 // require images 1218 1218 switch(modeID) { 1219 case 0: jscolor .requireImage('hs.png'); break;1220 case 1: jscolor .requireImage('hv.png'); break;1221 } 1222 jscolor .requireImage('cross.gif');1223 jscolor .requireImage('arrow.gif');1219 case 0: jscolorNPF.requireImage('hs.png'); break; 1220 case 1: jscolorNPF.requireImage('hv.png'); break; 1221 } 1222 jscolorNPF.requireImage('cross.gif'); 1223 jscolorNPF.requireImage('arrow.gif'); 1224 1224 1225 1225 this.importColor(); … … 1231 1231 * INITS 1232 1232 */ 1233 jscolor.install();1233 setTimeout(function(){jscolorNPF.install();},500); -
noprofeedorg/trunk/noprofeed-override.css
r465976 r640433 1 /* automatically created on 201 1-11-22 10:47:39 by noprofeed.lan */1 /* automatically created on 2012-12-17 09:31:19 by wp35.lan */ 2 2 3 #npf-widget-container{width: 310px;}4 #npf-wid-topShadow,#npf-wid-botShadow{width:80%;margin-left:10%;height:10px;background:url(http:// noprofeed.lan/wp-content/plugins/noprofeedorg/img/widget-shadow.png) no-repeat center top;display:block;}5 #npf-wid-botShadow{background:url(http:// noprofeed.lan/wp-content/plugins/noprofeedorg/img/widget-shadow.png) no-repeat center bottom;}6 #npf-widget{padding:10px 20px;border:1px solid #FFFFFF;color:#7B7051;background:#B5DBB4 url(http:// noprofeed.lan/wp-content/plugins/noprofeedorg/img/bg-pattern.png) repeat;}3 #npf-widget-container{width:265px;} 4 #npf-wid-topShadow,#npf-wid-botShadow{width:80%;margin-left:10%;height:10px;background:url(http://wp35.lan/wp-content/plugins/noprofeedorg/img/widget-shadow.png) no-repeat center top;display:block;} 5 #npf-wid-botShadow{background:url(http://wp35.lan/wp-content/plugins/noprofeedorg/img/widget-shadow.png) no-repeat center bottom;} 6 #npf-widget{padding:10px 20px;border:1px solid #FFFFFF;color:#7B7051;background:#B5DBB4 url(http://wp35.lan/wp-content/plugins/noprofeedorg/img/bg-pattern.png) repeat;} 7 7 #npf-widget a {color:#2585A8;} -
noprofeedorg/trunk/noprofeed.php
r465976 r640433 4 4 Plugin URI: http://noprofeed.org/ 5 5 Description: Help non-profit organizations to spread the word about their activities on the largest possible number of WordPress blogs/sites. 6 Version: 1. 1.16 Version: 1.2 7 7 Author: Ugo Grandolini aka "camaleo" 8 8 Author URI: http://grandolini.com 9 9 */ 10 10 /* 11 Copyright (C) 2010 Ugo Grandolini (email : [email protected])11 Copyright (C) 2010,2013 Ugo Grandolini (email : [email protected]) 12 12 13 13 This program is free software: you can redistribute it and/or modify … … 31 31 32 32 33 define('NOP_VERSION', '1. 0.8');33 define('NOP_VERSION', '1.2'); 34 34 define('NOP_DB_VERSION', '1.0.0'); 35 35 // TODO automatically upgrade the db structure when needed! -
noprofeedorg/trunk/readme.txt
r465976 r640433 1 1 === noprofeed.org === 2 2 Contributors: camaleo 3 Donate link: 3 Donate link: 4 4 Tags: social, help, update, comments, links, plugin, plugins, rss, sidebar, google, facebook, twitter, widget, wordpress 5 5 Requires at least: 2.8 6 Tested up to: 3. 3-beta36 Tested up to: 3.5.* 7 7 Stable tag: trunk 8 8 … … 57 57 58 58 == Changelog == 59 = 1.1.2 (17 December 2012) = 60 Added some missing images and fixed a minor bug. 59 61 60 62 = 1.1.1 (22 November 2011) =
Note: See TracChangeset
for help on using the changeset viewer.