Plugin Directory

Changeset 669227


Ignore:
Timestamp:
02/17/2013 11:41:27 AM (13 years ago)
Author:
jimaek
Message:

0.2 update

Location:
jsdelivr-wordpress-cdn-plugin/trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • jsdelivr-wordpress-cdn-plugin/trunk/backend/debug.php

    r589309 r669227  
    11<p>
    2   <a class="button" href="<?php echo admin_url('admin-ajax.php?action=jsdelivr_action_debug&jsd_action=check_update'); ?>" title="<?php _e('Check for update', $this->ld); ?>"><?php _e('Check for update', $this->ld); ?></a>
    3   <a class="button" href="<?php echo admin_url('admin-ajax.php?action=jsdelivr_action_debug&jsd_action=reset'); ?>" title="<?php _e('Reset', $this->ld); ?>"><?php _e('Reset', $this->ld); ?></a> 
     2  <a class="button" href="<?php echo admin_url('admin-ajax.php?action=jsdelivr_action_debug&jsd_action=check_update'); ?>" title="<?php _e('Check for update', self::ld); ?>"><?php _e('Check for update', self::ld); ?></a>
     3  <a class="button" href="<?php echo admin_url('admin-ajax.php?action=jsdelivr_action_debug&jsd_action=reset'); ?>" title="<?php _e('Reset', self::ld); ?>"><?php _e('Reset', self::ld); ?></a> 
    44</p>
  • jsdelivr-wordpress-cdn-plugin/trunk/backend/jsdelivr.js

    r589309 r669227  
    11jQuery(document).ready(function($)
    22{
     3
    34  var _self = this;
     5 
     6  this.showErrorMessage = function(content)
     7  {
     8    var datetime = 'Date: ' + new Date().toUTCString() + '\n';
     9    $('#jsd_error_dialog_text').val(datetime + content);
     10    tb_show(jsdelivr_data.text.error, '#TB_inline?width=550&height=320&inlineId=jsd_error_dialog');
     11  }
     12 
     13  $('#jsd_ok_error_button').bind('click', function()
     14  {
     15    tb_remove();
     16  });
    417
    518  this.scan = function()
    619  {     
    720    _self.show_wait();
    8     $.post(jsdelivr_data.action_admin, {'jsd_action': 'scan'}, function(r)
    9     {
    10       if ((typeof r.status !== 'undefined') && r.status == 1)
    11       {
    12         location.href = jsdelivr_data.default_url
    13       }
    14       else
     21    $.ajax({
     22      url: jsdelivr_data.action_admin,
     23      type: 'POST',
     24      async: true,
     25      data: {
     26        jsd_action: 'scan'
     27      },
     28      dataType: 'json',
     29      error: function(xhr, status, error)
    1530      {
    1631        _self.hide_wait();
    17         alert(jsdelivr_data.text.error_scan);
    18       }             
     32        var text = 'HTTP status: ' + xhr.status + '\nServer output:\n' + xhr.responseText;
     33        _self.showErrorMessage(text);
     34      },
     35      success: function(data, status, xhr)
     36      {
     37        if (data && data.hasOwnProperty('status') && data.status == 1)
     38          location.href = jsdelivr_data.default_url;
     39        else
     40        {
     41          _self.hide_wait();
     42          if (data && data.hasOwnProperty('message') && data.message)
     43            alert(data.message);
     44          else
     45            alert(jsdelivr_data.text.error_scan);
     46        }             
     47      }   
    1948    });   
    2049  }   
     
    2352  {
    2453    _self.show_wait();
    25     $.post(jsdelivr_data.action_admin, {'jsd_action': 'update_cdn'}, function(r)
    26     {
    27       if ((typeof r.status !== 'undefined') && r.status == 1)
    28       {
    29         location.href = jsdelivr_data.default_url
    30       }
    31       else
     54    $.ajax({
     55      url: jsdelivr_data.action_admin,
     56      type: 'POST',
     57      async: true,
     58      data: {
     59        jsd_action: 'update_cdn'
     60      },
     61      dataType: 'json',
     62      error: function(xhr, status, error)
    3263      {
    3364        _self.hide_wait();
    34         alert(jsdelivr_data.text.error_update_cdn);
    35       }             
    36     });           
     65        var text = 'HTTP status: ' + xhr.status + '\nServer output:\n' + xhr.responseText;
     66        _self.showErrorMessage(text);
     67      },
     68      success: function(data, status, xhr)
     69      {       
     70        if (data && data.hasOwnProperty('status') && data.status == 1)
     71          location.href = jsdelivr_data.default_url;
     72        else
     73        {
     74          _self.hide_wait();
     75          if (data && data.hasOwnProperty('message') && data.message)
     76            alert(data.message);
     77          else
     78            alert(jsdelivr_data.text.error_update_cdn);
     79        }             
     80      }   
     81    });   
    3782  }
    3883 
  • jsdelivr-wordpress-cdn-plugin/trunk/backend/options.php

    r589309 r669227  
    99else
    1010if (!$last_scan)
    11 {
    1211  $disabled_all = ' disabled';
    13 }
    1412
    1513$is_empty = !count($files);
    1614
    1715$disabled_bulk = $is_empty?' disabled':'';
    18 ?>
    19 
    20 <?php
     16
    2117if (!$last_cdn_update)
    2218{
     
    2420<div class="updated jsd_updated_message">
    2521  <p>
    26   <?php _e('First time, you must', $this->ld); ?>
    27   <a class="button jsd_update_cdn" href="#" onclick="return false;" title="<?php _e('Update CDN data', $this->ld); ?>"><?php _e('update CDN data', $this->ld); ?></a>.
    28   <?php _e('Then you will be able scan your website and activate CDN service for appropriate files.', $this->ld); ?>
     22  <?php _e('First time, you must', self::ld); ?>
     23  <a class="button jsd_update_cdn" href="#" onclick="return false;" title="<?php _e('Update CDN data', self::ld); ?>"><?php _e('update CDN data', self::ld); ?></a>.
     24  <?php _e('Then you will be able scan your website and activate CDN service for appropriate files.', self::ld); ?>
    2925  </p>
    3026</div>
     
    3733<div class="updated jsd_scan_message">
    3834  <p>
    39     <?php _e('Now, you can', $this->ld); ?>
    40     <a class="button jsd_scan" href="#"<?php echo $disabled_scan; ?> onclick="return false;" title="<?php _e('Scan website', $this->ld); ?>"><?php _e('scan your website', $this->ld); ?></a>   
     35    <?php _e('Now, you can', self::ld); ?>
     36    <a class="button jsd_scan" href="#"<?php echo $disabled_scan; ?> onclick="return false;" title="<?php _e('Scan website', self::ld); ?>"><?php _e('scan your website', self::ld); ?></a>   
    4137    .
    4238  </p>
     
    4642?>
    4743
     44<div id="jsd_error_dialog">
     45  <div class="jsd_error_dialog_content">
     46      <b><?php _e('An unexpected error occured.', self::ld); ?><br /></b>
     47      <textarea id="jsd_error_dialog_text" readonly></textarea>
     48      <div>
     49        <div class="jsd_error_dialog_support_text">
     50          <?php _e('Please report the error message in the box above at', self::ld); ?><br />
     51          <a href="http://wordpress.org/support/plugin/jsdelivr-wordpress-cdn-plugin" target="_blank">http://wordpress.org/support/plugin/jsdelivr-wordpress-cdn-plugin</a>
     52          <br />
     53          <?php _e('You can help us improve the plugin. Thanks.', self::ld); ?>
     54        </div>
     55        <div class="jsd_ok_error_button_div">
     56          <?php submit_button(__('Ok, I did it', self::ld), 'primary', 'jsd_ok_error_button', false); ?>
     57        </div>
     58        <div class="jsd_clear"></div>
     59      </div>     
     60  </div>
     61</div>
    4862
    4963<form name="save_form" method="POST" action="<?php echo $action_url; ?>">
    50 <?php wp_nonce_field('jsdelivr_nonce'); ?>
     64<?php wp_nonce_field(self::nonce); ?>
    5165
    5266<p>
    5367  <div class="jsd_control_left">
    5468    <select name="jsd_enabled"<?php echo $disabled_all; ?>>
    55       <option value="0"<?php echo (!$this->enabled?' selected':''); ?>><?php _e('Disabled', $this->ld); ?></option>
    56       <option value="1"<?php echo ($this->enabled?' selected':''); ?>><?php _e('Enabled', $this->ld); ?></option>
     69      <option value="0"<?php echo (!$this->enabled?' selected':''); ?>><?php _e('Disabled', self::ld); ?></option>
     70      <option value="1"<?php echo ($this->enabled?' selected':''); ?>><?php _e('Enabled', self::ld); ?></option>
    5771    </select>
    58     <input class="button-primary" type="submit"<?php echo $disabled_all; ?> name="save_options" title="<?php _e('Save all settings', $this->ld); ?>" value="<?php _e('Save all settings', $this->ld); ?>" id="submitbutton" />
     72    <input class="button-primary" type="submit"<?php echo $disabled_all; ?> name="save_options" title="<?php _e('Save all settings', self::ld); ?>" value="<?php _e('Save all settings', self::ld); ?>" id="submitbutton" />
    5973    <div class="jsd_clear"></div>
    6074  </div>
    6175  <div class="jsd_status_text<?php echo ($this->enabled?' jsd_status_text_enabled':' jsd_status_text_disabled'); ?>">
    62     <?php $this->enabled?_e('Plugin is enabled', $this->ld):_e('Plugin is disabled', $this->ld); ?>
     76    <?php $this->enabled?_e('Plugin is enabled', self::ld):_e('Plugin is disabled', self::ld); ?>
    6377  </div>
    6478  <div class="jsd_control_right">
    65     <a class="button jsd_scan" href="#"<?php echo $disabled_scan; ?> onclick="return false;" title="<?php _e('Scan website', $this->ld); ?>"><?php _e('Scan website', $this->ld); ?></a>   
     79    <a class="button jsd_scan" href="#"<?php echo $disabled_scan; ?> onclick="return false;" title="<?php _e('Scan website', self::ld); ?>"><?php _e('Scan website', self::ld); ?></a>   
    6680    <div class="jsd_clear"></div>
    6781  </div>
     
    7084
    7185<div class="jsd_bulk_actions">
    72   <b><?php _e('Bulk actions', $this->ld); ?></b>
    73   <label for="js_load_bulk_1"><?php _e('Script load', $this->ld); ?></label>
     86  <b><?php _e('Bulk actions', self::ld); ?></b>
     87  <label for="js_load_bulk_1"><?php _e('Script load', self::ld); ?></label>
    7488  <select name="js_load_bulk"<?php echo $disabled_bulk; ?> id="js_load_bulk_1">
    75     <option value="-1"><?php _e('Please select', $this->ld); ?></option>
    76     <option value="0"><?php _e('Regular', $this->ld); ?></option>
    77     <option value="1"><?php _e('Async', $this->ld); ?></option>
    78     <option value="2"><?php _e('Defer', $this->ld); ?></option>
     89    <option value="-1"><?php _e('Please select', self::ld); ?></option>
     90    <option value="0"><?php _e('Regular', self::ld); ?></option>
     91    <option value="1"><?php _e('Async', self::ld); ?></option>
     92    <option value="2"><?php _e('Defer', self::ld); ?></option>
    7993  </select> 
    80   <label for="move_footer_bulk_1"><?php _e('Move to the footer', $this->ld); ?></label>
     94  <label for="move_footer_bulk_1"><?php _e('Move to the footer', self::ld); ?></label>
    8195  <select name="move_footer_bulk"<?php echo $disabled_bulk; ?> id="move_footer_bulk_1">
    82     <option value="-1"><?php _e('Please select', $this->ld); ?></option>
    83     <option value="0"><?php _e('No', $this->ld); ?></option>
    84     <option value="1"><?php _e('Yes', $this->ld); ?></option>
    85   </select>                   
    86   <label for="status_bulk_1"><?php _e('Status', $this->ld); ?></label>
     96    <option value="-1"><?php _e('Please select', self::ld); ?></option>
     97    <option value="0"><?php _e('No', self::ld); ?></option>
     98    <option value="1"><?php _e('Yes', self::ld); ?></option>
     99  </select>                   
     100  <label for="status_bulk_1"><?php _e('Status', self::ld); ?></label>
    87101  <select name="status_bulk"<?php echo $disabled_bulk; ?> id="status_bulk_1">
    88     <option value="-1"><?php _e('Please select', $this->ld); ?></option>
    89     <option value="0"><?php _e('Disabled', $this->ld); ?></option>
    90     <option value="1"><?php _e('Enabled', $this->ld); ?></option>
    91   </select>                   
    92   <a class="button jsd_bulk_action"<?php echo $disabled_bulk; ?> href="#" onclick="return false;" title="<?php _e('Apply', $this->ld); ?>"><?php _e('Apply', $this->ld); ?></a>
     102    <option value="-1"><?php _e('Please select', self::ld); ?></option>
     103    <option value="0"><?php _e('Disabled', self::ld); ?></option>
     104    <option value="1"><?php _e('Enabled', self::ld); ?></option>
     105  </select>                   
     106  <a class="button jsd_bulk_action"<?php echo $disabled_bulk; ?> href="#" onclick="return false;" title="<?php _e('Apply', self::ld); ?>"><?php _e('Apply', self::ld); ?></a>
    93107</div>
    94108
     
    97111    <tr>
    98112        <th class="jsd_align_center"><input type="checkbox" name="jsd_checkbox_select_all" class="jsd_checkbox_select_all" value="1" /></th>
    99         <th><?php _e('File', $this->ld); ?></th>
    100         <th><?php _e('Package', $this->ld); ?></th>
    101         <th><?php _e('Status', $this->ld); ?></th>
    102         <th><?php _e('Match', $this->ld); ?></th>
     113        <th><?php _e('File', self::ld); ?></th>
     114        <th><?php _e('Package', self::ld); ?></th>
     115        <th><?php _e('Status', self::ld); ?></th>
     116        <th><?php _e('Match', self::ld); ?></th>
    103117    </tr>
    104118</thead>
     
    106120    <tr>
    107121        <th class="jsd_align_center"><input type="checkbox" name="jsd_checkbox_select_all" class="jsd_checkbox_select_all" value="1" /></th>
    108         <th><?php _e('File', $this->ld); ?></th>
    109         <th><?php _e('Package', $this->ld); ?></th>
    110         <th><?php _e('Status', $this->ld); ?></th>
    111         <th><?php _e('Match', $this->ld); ?></th>
     122        <th><?php _e('File', self::ld); ?></th>
     123        <th><?php _e('Package', self::ld); ?></th>
     124        <th><?php _e('Status', self::ld); ?></th>
     125        <th><?php _e('Match', self::ld); ?></th>
    112126    </tr>
    113127</tfoot>
     
    117131  {
    118132  ?>
    119   <tr><td colspan="5"><?php _e('File list is empty.', $this->ld); ?></td></tr> 
     133  <tr><td colspan="5"><?php _e('File list is empty.', self::ld); ?></td></tr> 
    120134  <?php
    121135  }
     
    139153    <td>
    140154      <b><?php echo $file['file_full_filename']; ?></b><br />
    141       <b><?php _e('Version:', $this->ld); ?> </b><?php echo $file['file_version']?$file['file_version']:__('None', $this->ld); ?>
     155      <b><?php _e('Version:', self::ld); ?> </b><?php echo $file['file_version']?$file['file_version']:__('None', self::ld); ?>
    142156     
    143157      <?php
     
    146160      ?>
    147161      <div class="jsd_options_box">
    148         <label for="js_load_<?php echo $file['file_id']; ?>"><?php _e('Script load', $this->ld); ?></label>
     162        <label for="js_load_<?php echo $file['file_id']; ?>"><?php _e('Script load', self::ld); ?></label>
    149163        <select class="jsd_script_load" name="js_load[<?php echo $file['file_id']; ?>]" id="js_load_<?php echo $file['file_id']; ?>">
    150           <option value="0"><?php _e('Regular', $this->ld); ?></option>
    151           <option value="1"<?php echo ($file['file_async']?' selected':''); ?>><?php _e('Async', $this->ld); ?></option>
    152           <option value="2"<?php echo ($file['file_defer']?' selected':''); ?>><?php _e('Defer', $this->ld); ?></option>
     164          <option value="0"><?php _e('Regular', self::ld); ?></option>
     165          <option value="1"<?php echo ($file['file_async']?' selected':''); ?>><?php _e('Async', self::ld); ?></option>
     166          <option value="2"<?php echo ($file['file_defer']?' selected':''); ?>><?php _e('Defer', self::ld); ?></option>
    153167        </select>               
    154168        <input class="jsd_move_footer" type="checkbox"<?php echo ($file['file_footer']?' checked':''); ?> name="move_footer[<?php echo $file['file_id']; ?>]" id="move_footer_<?php echo $file['file_id']; ?>" value="1" />
    155         <label for="move_footer_<?php echo $file['file_id']; ?>"><?php _e('Move to the footer', $this->ld); ?></label>
    156         <label for="priority_<?php echo $file['file_id']; ?>"><?php _e('with priority', $this->ld); ?></label>
     169        <label for="move_footer_<?php echo $file['file_id']; ?>"><?php _e('Move to the footer', self::ld); ?></label>
     170        <label for="priority_<?php echo $file['file_id']; ?>"><?php _e('with priority', self::ld); ?></label>
    157171        <input type="number" class="jsd_input_number" name="priority[<?php echo $file['file_id']; ?>]" value="<?php echo $file['file_priority']; ?>" id="priority_<?php echo $file['file_id']; ?>" />
    158172      </div>
     
    169183          $gcdn = $this->gcdn[$file['file_gcdn']];         
    170184      ?>
    171           <b><?php _e('Name:', $this->ld); ?> </b><?php echo $gcdn['name']; ?><br />
    172           <b><?php _e('Version:', $this->ld); ?> </b><?php echo in_array($file['file_version'], $gcdn['versions'])?$file['file_version']:$gcdn['versions'][0]; ?><br />
    173           <br /><?php _e('Google Hosted Libraries', $this->ld); ?>         
     185          <b><?php _e('Name:', self::ld); ?> </b><?php echo $gcdn['name']; ?><br />
     186          <b><?php _e('Version:', self::ld); ?> </b><?php echo in_array($file['file_version'], $gcdn['versions'])?$file['file_version']:$gcdn['versions'][0]; ?><br />
     187          <br /><?php _e('Google Hosted Libraries', self::ld); ?>         
    174188      <?php
    175189        }
     
    177191        {
    178192      ?>
    179           <b><?php _e('Name:', $this->ld); ?> </b><?php echo $file['cdn_name']; ?><br />
    180           <b><?php _e('Version:', $this->ld); ?> </b><?php echo $file['cdn_version']; ?><br />
    181           <b><?php _e('Author:', $this->ld); ?> </b> <?php echo $file['cdn_author']; ?><br />
     193          <b><?php _e('Name:', self::ld); ?> </b><?php echo $file['cdn_name']; ?><br />
     194          <b><?php _e('Version:', self::ld); ?> </b><?php echo $file['cdn_version']; ?><br />
     195          <b><?php _e('Author:', self::ld); ?> </b> <?php echo $file['cdn_author']; ?><br />
    182196          <a href="<?php echo $this->strip($file['cdn_homepage']); ?>" target="_blank"><?php echo $file['cdn_homepage']; ?></a>
    183197      <?php
     
    194208          <input class="jsd_checkbox_enabled" type="checkbox"<?php echo ($file['file_enabled'] == 1?' checked':''); ?> name="enabled[<?php echo $file['file_id']; ?>]" id="enabled_<?php echo $file['file_id']; ?>" value="1" />
    195209          <label for="enabled_<?php echo $file['file_id']; ?>">         
    196             <?php $file['file_enabled']?_e('Enabled', $this->ld):_e('Disabled', $this->ld); ?>
     210            <?php $file['file_enabled']?_e('Enabled', self::ld):_e('Disabled', self::ld); ?>
    197211          </label>
    198212        </div>
     
    208222        case JSDM_FULL:
    209223          $image_url = $this->url.'/backend/images/jsdm_full.png';
    210           $title = __('100% Match', $this->ld);
     224          $title = __('100% Match', self::ld);
    211225          break;
    212226        case JSDM_MAYBE:
    213227          $image_url = $this->url.'/backend/images/jsdm_maybe.png';
    214           $title = __('Same plugin, but maybe different versions', $this->ld);
     228          $title = __('Same plugin, but maybe different versions', self::ld);
    215229          break;
    216230        default:
    217231          $image_url = $this->url.'/backend/images/jsdm_none.png';                 
    218           $title = __('Not matching', $this->ld);
     232          $title = __('Not matching', self::ld);
    219233      }
    220234      ?>
     
    228242</table>
    229243<div class="jsd_bulk_actions">
    230   <b><?php _e('Bulk actions', $this->ld); ?></b>
    231   <label for="js_load_bulk_2"><?php _e('Script load', $this->ld); ?></label>
     244  <b><?php _e('Bulk actions', self::ld); ?></b>
     245  <label for="js_load_bulk_2"><?php _e('Script load', self::ld); ?></label>
    232246  <select name="js_load_bulk"<?php echo $disabled_bulk; ?> id="js_load_bulk_2">
    233     <option value="-1"><?php _e('Please select', $this->ld); ?></option>
    234     <option value="0"><?php _e('Regular', $this->ld); ?></option>
    235     <option value="1"><?php _e('Async', $this->ld); ?></option>
    236     <option value="2"><?php _e('Defer', $this->ld); ?></option>
     247    <option value="-1"><?php _e('Please select', self::ld); ?></option>
     248    <option value="0"><?php _e('Regular', self::ld); ?></option>
     249    <option value="1"><?php _e('Async', self::ld); ?></option>
     250    <option value="2"><?php _e('Defer', self::ld); ?></option>
    237251  </select> 
    238   <label for="move_footer_bulk_2"><?php _e('Move to the footer', $this->ld); ?></label>
     252  <label for="move_footer_bulk_2"><?php _e('Move to the footer', self::ld); ?></label>
    239253  <select name="move_footer_bulk"<?php echo $disabled_bulk; ?> id="move_footer_bulk_2">
    240     <option value="-1"><?php _e('Please select', $this->ld); ?></option>
    241     <option value="0"><?php _e('No', $this->ld); ?></option>
    242     <option value="1"><?php _e('Yes', $this->ld); ?></option>
    243   </select>                   
    244   <label for="status_bulk_2"><?php _e('Status', $this->ld); ?></label>
     254    <option value="-1"><?php _e('Please select', self::ld); ?></option>
     255    <option value="0"><?php _e('No', self::ld); ?></option>
     256    <option value="1"><?php _e('Yes', self::ld); ?></option>
     257  </select>                   
     258  <label for="status_bulk_2"><?php _e('Status', self::ld); ?></label>
    245259  <select name="status_bulk"<?php echo $disabled_bulk; ?> id="status_bulk_2">
    246     <option value="-1"><?php _e('Please select', $this->ld); ?></option>
    247     <option value="0"><?php _e('Disabled', $this->ld); ?></option>
    248     <option value="1"><?php _e('Enabled', $this->ld); ?></option>
    249   </select>                   
    250   <a class="button jsd_bulk_action"<?php echo $disabled_bulk; ?> href="#" onclick="return false;" title="<?php _e('Apply', $this->ld); ?>"><?php _e('Apply', $this->ld); ?></a>
     260    <option value="-1"><?php _e('Please select', self::ld); ?></option>
     261    <option value="0"><?php _e('Disabled', self::ld); ?></option>
     262    <option value="1"><?php _e('Enabled', self::ld); ?></option>
     263  </select>                   
     264  <a class="button jsd_bulk_action"<?php echo $disabled_bulk; ?> href="#" onclick="return false;" title="<?php _e('Apply', self::ld); ?>"><?php _e('Apply', self::ld); ?></a>
    251265</div>
    252266<p>
    253   <input class="button-primary" type="submit"<?php echo $disabled_all; ?> name="save_options" title="<?php _e('Save all settings', $this->ld); ?>" value="<?php _e('Save all settings', $this->ld); ?>" id="submitbutton" />
     267  <input class="button-primary" type="submit"<?php echo $disabled_all; ?> name="save_options" title="<?php _e('Save all settings', self::ld); ?>" value="<?php _e('Save all settings', self::ld); ?>" id="submitbutton" />
    254268</p>
    255269<div class="jsd_clear"></div>
  • jsdelivr-wordpress-cdn-plugin/trunk/backend/overview.php

    r589309 r669227  
    11<p>
    2   <?php _e('Overview of this plugin', $this->ld); ?>
     2  <?php _e('Overview of this plugin', self::ld); ?>
    33</p>
  • jsdelivr-wordpress-cdn-plugin/trunk/backend/styles.css

    r589309 r669227  
    164164  margin-right: 10px;
    165165}
     166
     167#jsd_error_dialog
     168{
     169  display: none;
     170}
     171
     172.jsd_error_dialog_content
     173{
     174  padding-top: 5px;
     175}
     176
     177#jsd_error_dialog_text
     178{
     179  width: 100%;
     180  height: 230px;
     181  font-family: courier;
     182  margin: 5px 0;
     183}
     184
     185.jsd_error_dialog_support_text
     186{
     187  float: left;
     188}
     189
     190.jsd_ok_error_button_div
     191{
     192  float: right;
     193}
  • jsdelivr-wordpress-cdn-plugin/trunk/backend/top.php

    r589309 r669227  
    11<div class="wrap">
    22  <div id="icon-options-general" class="icon32"></div>
    3   <h2>jsDelivr<?php _e(' - Wordpress CDN Plugin', $this->ld); ?></h2>
     3  <h2>jsDelivr<?php _e(' - Wordpress CDN Plugin', self::ld); ?></h2>
  • jsdelivr-wordpress-cdn-plugin/trunk/backend/update_notice.php

    r589309 r669227  
    44<div class="updated jsd_updated_notice">
    55  <p>
    6     <?php if (!$plugin_page) { ?><b><?php _e('jsDelivr CDN:', $this->ld); ?></b><?php } ?>
    7     <?php _e('New update of the CDN database available, please', $this->ld); ?>
    8     <a class="button" style="margin-left: 5px; margin-right: 5px;" href="<?php echo admin_url('options-general.php?page=jsdelivr&cdn_update=1'); ?>" title="<?php _e('Update CDN data', $this->ld); ?>"><?php _e('update CDN data', $this->ld); ?></a>
     6    <?php if (!$plugin_page) { ?><b><?php _e('jsDelivr CDN:', self::ld); ?></b><?php } ?>
     7    <?php _e('New update of the CDN database available, please', self::ld); ?>
     8    <a class="button" style="margin-left: 5px; margin-right: 5px;" href="<?php echo admin_url('options-general.php?page=jsdelivr&cdn_update=1'); ?>" title="<?php _e('Update CDN data', self::ld); ?>"><?php _e('update CDN data', self::ld); ?></a>
    99    .
    1010    <?php
     
    1212    {
    1313    ?>
    14       <a class="button jsd_dismiss_update_notice" style="margin-left: 10px;" href="#" onclick="return false;" title="<?php _e('Dismiss', $this->ld); ?>"><?php _e('Dismiss', $this->ld); ?></a>
     14      <a class="button jsd_dismiss_update_notice" style="margin-left: 10px;" href="#" onclick="return false;" title="<?php _e('Dismiss', self::ld); ?>"><?php _e('Dismiss', self::ld); ?></a>
    1515      <script>
    1616      jQuery(document).ready(function($)
  • jsdelivr-wordpress-cdn-plugin/trunk/jsdelivr.php

    r589309 r669227  
    55Description: The official plugin of jsDelivr.com, a free public CDN. An easy way to integrate the service and speed up your website using our super fast CDN.
    66Author: jsDelivr
    7 Version: 0.1
     7Version: 0.2
    88Author URI: http://www.jsdelivr.com
    99License: GPLv2
     
    2727  define('JSDM_FULL', 2);
    2828 
     29  class jsdelivr_Exception extends Exception { }
     30 
     31  // main class
    2932  class jsdelivr
    30   {
     33  {   
     34    const ld = 'jsdelivr'; // name of localization domain 
     35    const version = '0.2'; // current version
     36    const nonce = 'jsdelivr_nonce';
     37   
    3138    // turn on/off debug mode
    32     protected $debug = false;
    33      
    34     protected $ld = 'jsdelivr'; // name of localization domain   
     39    protected $debug = true;
     40         
    3541    protected $url; // plugin URL
    3642    protected $path; // plugin path
     
    3945       
    4046    // internal values
    41     private $user_agent = 'jsDelivr WP CDN Plugin';
    42     private $update_cdn_url = 'http://www.jsdelivr.com/hash.php';
    43     private $timestamp_url = 'http://www.jsdelivr.com/timestamp.txt';
     47    const user_agent = 'jsDelivr WP CDN Plugin';
     48    const update_cdn_url = 'http://www.jsdelivr.com/hash.php';
     49    const timestamp_url = 'http://www.jsdelivr.com/timestamp.txt';
     50   
    4451    private $cdn_baseurl = '//cdn.jsdelivr.net';
    4552   
     
    4956              'jquery' => array(
    5057                  'name' => 'jQuery',
    51                   'versions' =>  array(
     58                  'versions' =>  array(                         
     59                  // I added only versions up to 1.8.3, because it looks that many scripts are broken with jQuery version 1.9.x
     60                          '1.8.3', '1.8.2', '1.8.1',
    5261                          '1.8.0', '1.7.2', '1.7.1', '1.7.0', '1.6.4', '1.6.3', '1.6.2', '1.6.1', '1.6.0', '1.5.2',
    5362                          '1.5.1', '1.5.0', '1.4.4', '1.4.3', '1.4.2', '1.4.1', '1.4.0', '1.3.2', '1.3.1', '1.3.0',
     
    5766                )       
    5867          );
    59        
     68         
     69         
     70    // skip URLs with string occurrence from the list below during scan
     71    private $scan_skip_urls = array(
     72                   '.googleapis.com', 'cdn.jsdelivr.'
     73                );
     74
     75    private $supported_image_exts = array(
     76                  'jpg', 'jpeg', 'png', 'gif', 'bmp', 'svg', 'tif', 'xbm'
     77                );
     78                 
    6079    function __construct()
    6180    {                     
    62       // check used protocol and set proper cdn base URL
     81      // checks used protocol and set proper cdn base URL
     82      /* ! I commented this because what if PHP handler is hidden via proxy server that supports HTTPS protocol, eg:
     83         1. I have nginx as a router where is defined SSL certificate and requests are routed into apache server at port XY without SSL
     84         2. again I have nginx, but I didn't use parameter "fastcgi_param" to pass HTTPS variable into PHP script
     85         
     86         It should work correctly in way //example.com/some_file.js, so browser will choose correct scheme
     87      */
     88      /*
    6389      $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443)?"https":"http";
    6490      $this->cdn_baseurl = $protocol.':'.$this->cdn_baseurl;
     91      */
     92     
    6593     
    6694      $this->enabled = get_option('jsdelivr_enabled', false);
     
    6896      if (is_admin())
    6997      {
     98        // load translation on plugins_loaded
     99        add_action('plugins_loaded', array(&$this, 'plugins_loaded'));
     100     
    70101        $this->url = WP_PLUGIN_URL.'/'.dirname(plugin_basename(__FILE__));
    71102        $this->path = WP_PLUGIN_DIR.'/'.dirname(plugin_basename(__FILE__));
    72 
    73         // load language file
    74         $locale = get_locale();
    75         $mo = $this->path.'/languages/'.$locale.'.mo';
    76         load_textdomain($this->ld, $mo);
    77103       
    78104        add_action('admin_menu', array(&$this, 'admin_menu'));
     
    80106       
    81107        if ($this->debug)
    82         {
    83108          add_action('wp_ajax_jsdelivr_action_debug', array(&$this, 'action_debug'));       
    84         }
    85 
     109
     110         
    86111        // wp_cron action
    87112        add_action('jsdelivr_check_update', array(&$this, 'check_update_cdn'));
     
    96121        }
    97122                 
    98         // install hook
     123        // activation, deactivation and uninstall hooks
    99124        register_activation_hook(__FILE__, array(&$this, 'activation'));
    100125        register_deactivation_hook(__FILE__, array(&$this, 'deactivation'));
     126        register_uninstall_hook(__FILE__, array('jsdelivr', 'uninstall'));
    101127      }
    102128      else
    103       {
    104         // plugin is enabled
    105         if ($this->enabled)
    106         {
    107           add_action('init', array(&$this, 'init_onthefly'), 0);
    108         }
    109       }
     129      if ($this->enabled) // if plugin is enabled
     130        add_action('init', array(&$this, 'init_onthefly'), 0);
    110131    }
    111132   
     
    164185     
    165186      if (!wp_next_scheduled('jsdelivr_check_update'))
    166       {
    167187        wp_schedule_event(time(), 'daily', 'jsdelivr_check_update');
    168       }                             
    169188    }
    170189
     
    189208    {
    190209      require_once $this->path.'/backend/update_notice.php';
     210    }
     211   
     212    // on plugins_loaded
     213    function plugins_loaded()
     214    {
     215      // load text domain
     216      load_plugin_textdomain(self::ld, false, $this->path.'/languages/');
    191217    }   
    192218
     
    194220    function admin_menu()
    195221    {
    196       $hook = add_options_page(__('jsDelivr CDN', $this->ld), __('jsDelivr CDN', $this->ld), 'manage_options', 'jsdelivr', array(&$this, 'options_page'));
     222      $hook = add_options_page(__('jsDelivr CDN', self::ld), __('jsDelivr CDN', self::ld), 'manage_options', 'jsdelivr', array(&$this, 'options_page'));
    197223      add_filter('plugin_action_links_'.plugin_basename(__FILE__), array(&$this, 'filter_plugin_actions'), 10, 2);
    198224     
     
    204230      else // this is for backward compatibility < WP 3.3
    205231      {
     232        /*
    206233        ob_start();
    207234        require_once $this->path.'/backend/overview.php';
     
    209236        ob_end_clean();
    210237        add_contextual_help($hook, $content);
     238        */
    211239      }
    212240           
     
    221249      $screen = get_current_screen();
    222250     
     251      if (!method_exists($screen, 'add_help_tab'))
     252        return;
     253     
    223254      // overview tab
     255      /*
    224256      $screen->add_help_tab(array(
    225257            'id' => 'jsdelivr_overview',
    226             'title' => __('Overview', $this->ld),
     258            'title' => __('Overview', self::ld),
    227259            'callback' => array(&$this, 'help_overview')           
    228260          ));
    229        
     261      */
     262             
    230263      // debug tab for developers   
    231264      if ($this->debug)
     
    233266        $screen->add_help_tab(array(
    234267            'id' => 'jsdelivr_debug',
    235             'title' => __('Debug', $this->ld),
     268            'title' => __('Debug', self::ld),
    236269            'callback' => array(&$this, 'help_debug')           
    237270          ));                       
     
    239272    }
    240273   
    241     function help_overview() { require_once $this->path.'/backend/overview.php'; }
     274    //function help_overview() { require_once $this->path.'/backend/overview.php'; }
    242275    function help_debug() { require_once $this->path.'/backend/debug.php'; }
    243276   
     
    245278    function add_admin_css()
    246279    {
    247       wp_enqueue_style('jsdelivr_styles', $this->url.'/backend/styles.css', array(), '1.0', 'all');         
     280      wp_enqueue_style('thickbox');
     281      wp_enqueue_style('jsdelivr_styles', $this->url.'/backend/styles.css', array(), self::version, 'all');         
    248282    }
    249283   
     
    251285    {
    252286      wp_enqueue_script('jquery');
     287      wp_enqueue_script('thickbox');
    253288      wp_enqueue_script('jquery.blockUI', $this->url.'/3rdparty/jquery.blockUI.js', array('jquery'), '2.42');         
    254       wp_enqueue_script('jsdelivr', $this->url.'/backend/jsdelivr.js', array('jquery'), '1.0', false);         
     289      wp_enqueue_script('jsdelivr', $this->url.'/backend/jsdelivr.js', array('jquery'), self::version, false);         
    255290      wp_localize_script('jsdelivr', 'jsdelivr_data',
    256291            array(
     
    259294              'cdn_update' => isset($_GET['cdn_update'])?true:false,
    260295              'text' => array(
    261                   'please_wait' => __('Please wait...', $this->ld),
    262                   'error_scan' => __('Error occured during scan process.', $this->ld),
    263                   'error_update_cdn' => __('Error occured during update process.', $this->ld)
     296                  'please_wait' => __('Please wait...', self::ld),
     297                  'error' => __('Error', self::ld),
     298                  'error_scan' => __('Error occured during scan process.', self::ld),
     299                  'error_update_cdn' => __('Error occured during update process.', self::ld)
    264300                )
    265301              ));             
     
    309345      header("Content-Type: application/json");
    310346     
     347      $message = false;
     348      $r = false;
     349     
    311350      switch($_POST['jsd_action'])
    312351      {
    313         case 'scan':
    314           $r = $this->scan();
     352        case 'scan':                   
     353          try
     354          {
     355            $r = $this->scan();
     356          }
     357          catch(jsdelivr_Exception $e)
     358          {
     359            $message = $e->getMessage();
     360          }
     361         
    315362          if ($r)
    316           {
    317363            echo json_encode(array('status' => 1));           
    318           }
    319364          else
    320           {
    321             echo json_encode(array('status' => 2));                       
    322           }
     365            echo json_encode(array('status' => 2, 'message' => $message));
     366           
    323367          break;
    324368         
    325369        case 'update_cdn':
    326           $r = $this->update_cdn();
     370          try
     371          {
     372            $r = $this->update_cdn();
     373          }
     374          catch(jsdelivr_Exception $e)
     375          {
     376            $message = $e->getMessage();
     377          }
     378         
    327379          if ($r)
    328           {
    329380            echo json_encode(array('status' => 1));                     
    330           }
    331381          else
    332           {
    333             echo json_encode(array('status' => 2));                     
    334           }       
     382            echo json_encode(array('status' => 2, 'message' => $message));                     
    335383          break;
    336384         
     
    349397      $action_url = admin_url('options-general.php?page=jsdelivr');
    350398     
    351       require_once $this->path.'/backend/top.php';           
    352                              
     399      require_once $this->path.'/backend/top.php';
     400     
    353401      // save options
    354402      if (isset($_POST['save_options']) && $_POST['save_options'])
    355403      {
    356         if (!wp_verify_nonce($_POST['_wpnonce'], 'jsdelivr_nonce'))
    357         {
    358           die(__('Whoops! There was a problem with the data you posted. Please go back and try again.', $this->ld));
     404        if (!wp_verify_nonce($_POST['_wpnonce'], self::nonce))
     405        {
     406          die(__('Whoops! There was a problem with the data you posted. Please go back and try again.', self::ld));
    359407        }
    360408       
     
    393441        $this->cache_flush();
    394442       
    395         echo '<div class="updated"><p>'.__('Settings were sucessfully saved.', $this->ld).'</p></div>';
     443        echo '<div class="updated"><p>'.__('Settings were sucessfully saved.', self::ld).'</p></div>';
    396444      }
    397445
     
    439487     
    440488      if ($data_from && $data_to)
    441       {               
    442489        return str_replace($data_from, $data_to, $buffer);
    443       }
    444490      else
    445       {
    446491        return $buffer;
    447       }
    448492    }
    449493   
     
    456500    // loads content of website at URL address
    457501    protected function get_content($url)
    458     {     
    459       if (function_exists('curl_init'))
     502    {
     503      $handled = false;
     504      $data = false;
     505     
     506      if (function_exists('curl_init')) // CURL method
    460507      {
    461508        $ch = curl_init();
     
    464511                      CURLOPT_FRESH_CONNECT => true,
    465512                      CURLOPT_FOLLOWLOCATION => false,
    466                       CURLOPT_USERAGENT => $this->user_agent,
     513                      CURLOPT_USERAGENT => self::user_agent,
    467514                      CURLOPT_HEADER => true,
    468515                      CURLOPT_RETURNTRANSFER => true
     
    486533            if (!$url['host']) $url['host'] = $last_url['host'];
    487534            if (!$url['path']) $url['path'] = $last_url['path'];       
    488             $new_url = $url['scheme'] . '://' . $url['host'] . $url['path'] . ($url['query']?'?'.$url['query']:'');
     535            $new_url = $url['scheme'] . '://' . $url['host'] . $url['path'] . (isset($url['query']) && $url['query']?'?'.$url['query']:'');
    489536            $data = $this->get_content($new_url);
    490537          }
    491538        }
    492539        else
    493         {                                                                     
    494540          $data = substr($data, $delimiter + 4, strlen($data) - $delimiter - 4);
    495         }         
     541         
     542        $handled = true;
    496543        curl_close($ch);
    497544      }
    498545      else
    499546      {
    500         // TODO: add more methods ?       
    501         $data = false;         
    502       }
     547        $wrappers = stream_get_wrappers();
     548
     549        // uses fopen http wrapper via function file_get_contents
     550        if (ini_get('allow_url_fopen') && in_array('http', $wrappers))
     551        {
     552          $data = file_get_contents($url);
     553         
     554          if ($data === false)
     555            throw new jsdelivr_Exception(__('Cannot get content from remove server via function file_get_contents. Please check configuration of your server or install CURL.', self::ld));
     556           
     557          $handled = true;         
     558        }
     559        else // still we can try fsockopen
     560        {
     561          // get supported transports
     562          $transports = stream_get_transports();         
     563          if (in_array('tcp', $transports) && in_array('ssl', $transports))
     564          {
     565            $url = parse_url($url);
     566            $ssl = stripos($url['scheme'], 'https') !== false;
     567           
     568            $f = fsockopen(($ssl?'ssl':'tcp').'://'.$url['host'], $ssl?443:80, $errno, $errstr);
     569            if ($f)
     570            {
     571              $s = "GET ".$url['path']." HTTP/1.1\r\n";
     572              $s.= "Host: ".$url['host']."\r\n";
     573              $s.= "User-Agent: ".self::user_agent."\r\n";
     574              $s.= "Connection: Close\r\n\r\n";
     575              fwrite($f, $s);
     576             
     577              $output = '';
     578              while(!feof($f) && $line = fgets($f))
     579                $output.= $line;
     580
     581              fclose($f);
     582             
     583              // check if it's redirect             
     584              if (preg_match('/HTTP\/.{3} (301|302)/', $output))
     585              {
     586                // get location
     587                if (preg_match('/Location: (.*?)\r/i', $output, $o))
     588                  $data = $this->get_content($o[1]);
     589              }
     590              else
     591              {
     592                $delimiter = strpos($output, "\r\n\r\n");
     593                $data = substr($output, $delimiter + 4, strlen($output) - $delimiter - 4);
     594              }
     595             
     596              $handled = true;
     597            }           
     598          }
     599        }
     600      }
     601     
     602      if (!$handled)
     603        throw new jsdelivr_Exception(__('Cannot get content from remote server. Please enable CURL or allow_url_fopen with appropriate wrappers or tcp/ssl transports on your server.', self::ld));
     604     
    503605      return $data;             
    504606    }
     
    507609    function check_update_cdn()
    508610    {
    509       $timestamp = trim($this->get_content($this->timestamp_url));
     611      $timestamp = trim($this->get_content(self::timestamp_url));
    510612     
    511613      if (!$timestamp)
    512       {
    513614        return false;
    514       }
    515615     
    516616      if ($timestamp == get_option('jsdelivr_last_cdn_update', false) ||
     
    530630      global $wpdb;
    531631
    532       if (!$data = $this->get_content($this->update_cdn_url))
    533       {
     632      if (!$data = $this->get_content(self::update_cdn_url))       
    534633        return false;
    535       }
    536634     
    537635      // truncate tables
     
    558656        $sql_values = array();
    559657        while(list($file_id, $file_name) = @each($package['files']))
    560         {
    561658          $sql_values[] = "($insert_id, '".$wpdb->escape($file_name)."', '".$wpdb->escape($package['hashes'][$file_id])."')";
    562         }
    563659       
    564660        if (count($sql_values) > 0)
     
    570666     
    571667      if (!$timestamp = get_option('jsdelivr_update_cdn_timestamp', false))
    572       {     
    573668        $timestamp = $this->check_update_cdn();
    574       }                             
     669       
    575670      update_option('jsdelivr_last_cdn_update', $timestamp);
    576671
     
    578673         
    579674      return true;
     675    }
     676   
     677   
     678    // preg_quote all values in array
     679    function preg_quote_array($array)
     680    {
     681      foreach($array as $k => $v)
     682        $array[$k] = preg_quote($v);
     683       
     684      return $array;
    580685    }
    581686       
    582687    // creates list of scripts and CSS links
    583688    protected function parse_html($data)
    584     {                                           
    585       if (preg_match_all('/(<link.[^>]+href\s*=\s*[\'"](.[^\."\']+\.css)(\?ver=(.[^\'"]+?)|)[\'"].*?'.'>)|(<script.[^>]+src\s*=\s*[\'|"](.[^\?"\']+)(\?ver=(.[^\'"]+)|)[\'|"].*?<\/script>)|(<img.+?src\s*=\s*[\'|"](.[^\'"]+).*?'.'>)/is', $data, $o))
    586       {
     689    {
     690      // prepare ignore list
     691      $ignore_list = '/'.@implode('|', self::preg_quote_array($this->scan_skip_urls)).'/i';
     692      $exts = $this->supported_image_exts;
     693     
     694      if (preg_match_all('/(<link.[^>]*href\s*=\s*[\'"](.[^"\']+\.css)(\?ver=(.[^\'"]+?)|)[\'"].*?'.'>)|(<script.[^>]*src\s*=\s*[\'|"](.[^\?"\']+)(\?ver=(.[^\'"]+)|)[\'|"].*?<\/script>)|(<img.[^>]*src\s*=\s*[\'|"](.[^\'"]+\.('.implode('|', $exts).'))[\'"].*?'.'>)/is', $data, $o))
     695      {       
    587696        $main_url = get_site_url().'/';
    588697        $list = array();
     
    591700          $url = trim($o[2][$k]?$o[2][$k]:($o[6][$k]?$o[6][$k]:($o[10][$k]?$o[10][$k]:'')));
    592701
    593           // skip google hosted files
    594           if (stripos($url, '.googleapis.com') !== false) continue;
     702          // skip names listed in the ignore list
     703          if (preg_match($ignore_list, $url)) continue;
    595704         
    596705          $version = trim($o[4][$k]?$o[4][$k]:($o[8][$k]?$o[8][$k]:''));
     
    599708          $key = md5($url.$version);         
    600709          if (isset($list[$key])) continue;
     710         
     711          $hash = @md5_file($file);         
    601712                             
    602713          $list[$key] = array(
     
    606717                'file' => $file,
    607718                'rel_filename' => str_replace($main_url, '', $url),
    608                 'hash' => md5_file($file),                 
     719                'hash' => $hash?$hash:false,                 
    609720                'version' => $version
    610721              );       
     
    624735        {
    625736          if (in_array($version, $data['versions']))
    626           {
    627737            $match = JSDM_FULL;         
    628           }
    629738          else
    630           {
    631739            $match = JSDM_MAYBE;
    632           }         
     740           
    633741          return array(
    634742                    'name' => $name,
     
    645753      // W3 Total Cache
    646754      if (function_exists('w3tc_pgcache_flush'))
    647       {
    648         w3tc_pgcache_flush();     
    649       }
     755        w3tc_pgcache_flush();
    650756     
    651757      // WP Super Cache
    652758      if (function_exists('wp_cache_clear_cache'))
    653       {
    654759        wp_cache_clear_cache();
    655        
     760       
    656761    }
    657762   
    658763    // scan page and save script/css files into DB
    659764    protected function scan()
    660     {
     765    {     
    661766      global $wpdb;           
    662767      update_option('jsdelivr_enabled', false);
     
    667772                      FROM {$wpdb->jsd_files}
    668773                ", ARRAY_A);
     774               
    669775      $old_settings = array();
    670776      while(list(, $l) = @each($r))
    671       {
    672777        $old_settings[$l['hash']] = $l;
    673       }     
     778       
    674779     
    675780      // truncate table with files
     
    677782   
    678783      $pages = array();
    679       $pages[] = get_bloginfo('home'); // it can scan more URLs, but this is for testing
     784      $pages[] = get_bloginfo('home').'/'; // it can scan more URLs, but this is for testing
    680785
    681786      // cache flush
     
    684789      $html = '';
    685790      while(list(, $page) = @each($pages))
    686       {
    687791        if ($c = $this->get_content($page))
    688         {
    689792          $html.= $c;         
    690         }       
    691       }
    692              
     793     
     794     
    693795      $list = $this->parse_html($html);
    694796     
     
    763865          $enabled = $footer = $defer = $async = $priority = 0;
    764866        }
    765                                                            
     867       
    766868        $sql_values[] = "(".$item['type'].",
    767869                          '".$file."',
     
    9011003    }           
    9021004  }
    903 }
    904 
    905 if (class_exists('jsdelivr'))
    906 {
    907   register_uninstall_hook(__FILE__, array('jsdelivr', 'uninstall'));     
    908   new jsdelivr();     
     1005 
     1006  new jsdelivr();
    9091007}
    9101008?>
  • jsdelivr-wordpress-cdn-plugin/trunk/languages/jsdelivr.po

    r589309 r669227  
    33"Project-Id-Version: jsDelivr - Wordpress CDN Plugin\n"
    44"Report-Msgid-Bugs-To: \n"
    5 "POT-Creation-Date: 2012-08-22 06:49+0100\n"
    6 "PO-Revision-Date: 2012-08-23 12:23+0200\n"
    7 "Last-Translator: Akulov Dmitriy <dakulovgr@gmail.com>\n"
     5"POT-Creation-Date: 2013-02-17 03:44+0100\n"
     6"PO-Revision-Date: 2013-02-17 03:44+0100\n"
     7"Last-Translator: Martin Sudolsky <martin@sudolsky.com>\n"
    88"Language-Team: jsDelivr <[email protected]>\n"
     9"Language: en\n"
    910"MIME-Version: 1.0\n"
    1011"Content-Type: text/plain; charset=UTF-8\n"
     
    1314"X-Poedit-Basepath: .\n"
    1415"X-Poedit-SourceCharset: utf-8\n"
    15 "Language: en\n"
     16"X-Generator: Poedit 1.5.4\n"
    1617"X-Poedit-SearchPath-0: ..\n"
    1718
    18 #: ../jsdelivr.php:196
     19#: ../jsdelivr.php:222
    1920msgid "jsDelivr CDN"
    2021msgstr ""
    2122
    22 #: ../jsdelivr.php:226
    23 msgid "Overview"
    24 msgstr ""
    25 
    26 #: ../jsdelivr.php:235
     23#: ../jsdelivr.php:268
    2724msgid "Debug"
    2825msgstr ""
    2926
    30 #: ../jsdelivr.php:261
     27#: ../jsdelivr.php:296
    3128msgid "Please wait..."
    3229msgstr ""
    3330
    34 #: ../jsdelivr.php:262
     31#: ../jsdelivr.php:297
     32msgid "Error"
     33msgstr ""
     34
     35#: ../jsdelivr.php:298
    3536msgid "Error occured during scan process."
    3637msgstr ""
    3738
    38 #: ../jsdelivr.php:263
     39#: ../jsdelivr.php:299
    3940msgid "Error occured during update process."
    4041msgstr ""
    4142
    42 #: ../jsdelivr.php:271
     43#: ../jsdelivr.php:307
    4344msgid "Settings"
    4445msgstr ""
    4546
    46 #: ../jsdelivr.php:358
     47#: ../jsdelivr.php:406
    4748msgid ""
    4849"Whoops! There was a problem with the data you posted. Please go back and try "
     
    5051msgstr ""
    5152
    52 #: ../jsdelivr.php:395
     53#: ../jsdelivr.php:443
    5354msgid "Settings were sucessfully saved."
     55msgstr ""
     56
     57#: ../jsdelivr.php:555
     58msgid ""
     59"Cannot get content from remove server via function file_get_contents. Please "
     60"check configuration of your server or install CURL."
     61msgstr ""
     62
     63#: ../jsdelivr.php:603
     64msgid ""
     65"Cannot get content from remote server. Please enable CURL or allow_url_fopen "
     66"with appropriate wrappers or tcp/ssl transports on your server."
    5467msgstr ""
    5568
     
    6275msgstr ""
    6376
    64 #: ../backend/options.php:26
     77#: ../backend/options.php:22
    6578msgid "First time, you must"
    6679msgstr ""
    6780
    68 #: ../backend/options.php:27 ../backend/update_notice.php:8
     81#: ../backend/options.php:23 ../backend/update_notice.php:8
    6982msgid "Update CDN data"
    7083msgstr ""
    7184
    72 #: ../backend/options.php:27 ../backend/update_notice.php:8
     85#: ../backend/options.php:23 ../backend/update_notice.php:8
    7386msgid "update CDN data"
    7487msgstr ""
    7588
    76 #: ../backend/options.php:28
     89#: ../backend/options.php:24
    7790msgid ""
    7891"Then you will be able scan your website and activate CDN service for "
     
    8093msgstr ""
    8194
    82 #: ../backend/options.php:39
     95#: ../backend/options.php:35
    8396msgid "Now, you can"
    8497msgstr ""
    8598
    86 #: ../backend/options.php:40 ../backend/options.php:65
     99#: ../backend/options.php:36 ../backend/options.php:79
    87100msgid "Scan website"
    88101msgstr ""
    89102
    90 #: ../backend/options.php:40
     103#: ../backend/options.php:36
    91104msgid "scan your website"
    92105msgstr ""
    93106
    94 #: ../backend/options.php:55 ../backend/options.php:89
    95 #: ../backend/options.php:196 ../backend/options.php:247
     107#: ../backend/options.php:46
     108msgid "An unexpected error occured."
     109msgstr ""
     110
     111#: ../backend/options.php:50
     112msgid "Please report the error message in the box above at"
     113msgstr ""
     114
     115#: ../backend/options.php:53
     116msgid "You can help us improve the plugin. Thanks."
     117msgstr ""
     118
     119#: ../backend/options.php:56
     120msgid "Ok, I did it"
     121msgstr ""
     122
     123#: ../backend/options.php:69 ../backend/options.php:103
     124#: ../backend/options.php:210 ../backend/options.php:261
    96125msgid "Disabled"
    97126msgstr ""
    98127
    99 #: ../backend/options.php:56 ../backend/options.php:90
    100 #: ../backend/options.php:196 ../backend/options.php:248
     128#: ../backend/options.php:70 ../backend/options.php:104
     129#: ../backend/options.php:210 ../backend/options.php:262
    101130msgid "Enabled"
    102131msgstr ""
    103132
    104 #: ../backend/options.php:58 ../backend/options.php:253
     133#: ../backend/options.php:72 ../backend/options.php:267
    105134msgid "Save all settings"
    106135msgstr ""
    107136
    108 #: ../backend/options.php:62
     137#: ../backend/options.php:76
    109138msgid "Plugin is enabled"
    110139msgstr ""
    111140
    112 #: ../backend/options.php:62
     141#: ../backend/options.php:76
    113142msgid "Plugin is disabled"
    114143msgstr ""
    115144
    116 #: ../backend/options.php:72 ../backend/options.php:230
     145#: ../backend/options.php:86 ../backend/options.php:244
    117146msgid "Bulk actions"
    118147msgstr ""
    119148
    120 #: ../backend/options.php:73 ../backend/options.php:148
    121 #: ../backend/options.php:231
     149#: ../backend/options.php:87 ../backend/options.php:162
     150#: ../backend/options.php:245
    122151msgid "Script load"
    123152msgstr ""
    124153
    125 #: ../backend/options.php:75 ../backend/options.php:82
    126 #: ../backend/options.php:88 ../backend/options.php:233
    127 #: ../backend/options.php:240 ../backend/options.php:246
     154#: ../backend/options.php:89 ../backend/options.php:96
     155#: ../backend/options.php:102 ../backend/options.php:247
     156#: ../backend/options.php:254 ../backend/options.php:260
    128157msgid "Please select"
    129158msgstr ""
    130159
    131 #: ../backend/options.php:76 ../backend/options.php:150
    132 #: ../backend/options.php:234
     160#: ../backend/options.php:90 ../backend/options.php:164
     161#: ../backend/options.php:248
    133162msgid "Regular"
    134163msgstr ""
    135164
    136 #: ../backend/options.php:77 ../backend/options.php:151
    137 #: ../backend/options.php:235
     165#: ../backend/options.php:91 ../backend/options.php:165
     166#: ../backend/options.php:249
    138167msgid "Async"
    139168msgstr ""
    140169
    141 #: ../backend/options.php:78 ../backend/options.php:152
    142 #: ../backend/options.php:236
     170#: ../backend/options.php:92 ../backend/options.php:166
     171#: ../backend/options.php:250
    143172msgid "Defer"
    144173msgstr ""
    145174
    146 #: ../backend/options.php:80 ../backend/options.php:155
    147 #: ../backend/options.php:238
     175#: ../backend/options.php:94 ../backend/options.php:169
     176#: ../backend/options.php:252
    148177msgid "Move to the footer"
    149178msgstr ""
    150179
    151 #: ../backend/options.php:83 ../backend/options.php:241
     180#: ../backend/options.php:97 ../backend/options.php:255
    152181msgid "No"
    153182msgstr ""
    154183
    155 #: ../backend/options.php:84 ../backend/options.php:242
     184#: ../backend/options.php:98 ../backend/options.php:256
    156185msgid "Yes"
    157186msgstr ""
    158187
    159 #: ../backend/options.php:86 ../backend/options.php:101
    160 #: ../backend/options.php:110 ../backend/options.php:244
     188#: ../backend/options.php:100 ../backend/options.php:115
     189#: ../backend/options.php:124 ../backend/options.php:258
    161190msgid "Status"
    162191msgstr ""
    163192
    164 #: ../backend/options.php:92 ../backend/options.php:250
     193#: ../backend/options.php:106 ../backend/options.php:264
    165194msgid "Apply"
    166195msgstr ""
    167196
    168 #: ../backend/options.php:99 ../backend/options.php:108
     197#: ../backend/options.php:113 ../backend/options.php:122
    169198msgid "File"
    170199msgstr ""
    171200
    172 #: ../backend/options.php:100 ../backend/options.php:109
     201#: ../backend/options.php:114 ../backend/options.php:123
    173202msgid "Package"
    174203msgstr ""
    175204
    176 #: ../backend/options.php:102 ../backend/options.php:111
     205#: ../backend/options.php:116 ../backend/options.php:125
    177206msgid "Match"
    178207msgstr ""
    179208
    180 #: ../backend/options.php:119
     209#: ../backend/options.php:133
    181210msgid "File list is empty."
    182211msgstr ""
    183212
    184 #: ../backend/options.php:141 ../backend/options.php:172
    185 #: ../backend/options.php:180
     213#: ../backend/options.php:155 ../backend/options.php:186
     214#: ../backend/options.php:194
    186215msgid "Version:"
    187216msgstr ""
    188217
    189 #: ../backend/options.php:141
     218#: ../backend/options.php:155
    190219msgid "None"
    191220msgstr ""
    192221
    193 #: ../backend/options.php:156
     222#: ../backend/options.php:170
    194223msgid "with priority"
    195224msgstr ""
    196225
    197 #: ../backend/options.php:171 ../backend/options.php:179
     226#: ../backend/options.php:185 ../backend/options.php:193
    198227msgid "Name:"
    199228msgstr ""
    200229
    201 #: ../backend/options.php:173
     230#: ../backend/options.php:187
    202231msgid "Google Hosted Libraries"
    203232msgstr ""
    204233
    205 #: ../backend/options.php:181
     234#: ../backend/options.php:195
    206235msgid "Author:"
    207236msgstr ""
    208237
    209 #: ../backend/options.php:210
     238#: ../backend/options.php:224
    210239msgid "100% Match"
    211240msgstr ""
    212241
    213 #: ../backend/options.php:214
     242#: ../backend/options.php:228
    214243msgid "Same plugin, but maybe different versions"
    215244msgstr ""
    216245
    217 #: ../backend/options.php:218
     246#: ../backend/options.php:232
    218247msgid "Not matching"
    219248msgstr ""
  • jsdelivr-wordpress-cdn-plugin/trunk/languages/sk_SK.po

    r589309 r669227  
    33"Project-Id-Version: jsDelivr - Wordpress CDN Plugin\n"
    44"Report-Msgid-Bugs-To: \n"
    5 "POT-Creation-Date: 2012-08-23 09:15+0100\n"
    6 "PO-Revision-Date: 2012-08-23 09:52+0100\n"
     5"POT-Creation-Date: 2013-02-17 03:45+0100\n"
     6"PO-Revision-Date: 2013-02-17 03:48+0100\n"
    77"Last-Translator: Martin Sudolsky <[email protected]>\n"
    88"Language-Team: jsDelivr <[email protected]>\n"
     9"Language: sk_SK\n"
    910"MIME-Version: 1.0\n"
    1011"Content-Type: text/plain; charset=UTF-8\n"
     
    1213"X-Poedit-KeywordsList: __;_e\n"
    1314"X-Poedit-Basepath: .\n"
    14 "X-Poedit-Language: Slovak\n"
    1515"X-Poedit-SourceCharset: utf-8\n"
    16 "X-Poedit-Country: SLOVAKIA\n"
     16"X-Generator: Poedit 1.5.4\n"
    1717"X-Poedit-SearchPath-0: ..\n"
    1818
    19 #: ../jsdelivr.php:196
     19#: ../jsdelivr.php:222
    2020msgid "jsDelivr CDN"
    2121msgstr "jsDelivr CDN"
    2222
    23 #: ../jsdelivr.php:226
    24 msgid "Overview"
    25 msgstr "Prehľad"
    26 
    27 #: ../jsdelivr.php:235
     23#: ../jsdelivr.php:268
    2824msgid "Debug"
    2925msgstr "Ladiť"
    3026
    31 #: ../jsdelivr.php:261
     27#: ../jsdelivr.php:296
    3228msgid "Please wait..."
    3329msgstr "Čakajte..."
    3430
    35 #: ../jsdelivr.php:262
     31#: ../jsdelivr.php:297
     32msgid "Error"
     33msgstr "Chyba"
     34
     35#: ../jsdelivr.php:298
    3636msgid "Error occured during scan process."
    3737msgstr "Nastala chyba počas skenovania stránky."
    3838
    39 #: ../jsdelivr.php:263
     39#: ../jsdelivr.php:299
    4040msgid "Error occured during update process."
    4141msgstr "Nastava chyba počas aktualizácie."
    4242
    43 #: ../jsdelivr.php:271
     43#: ../jsdelivr.php:307
    4444msgid "Settings"
    4545msgstr "Nastavenia"
    4646
    47 #: ../jsdelivr.php:358
    48 msgid "Whoops! There was a problem with the data you posted. Please go back and try again."
    49 msgstr "Hopla! Objavil sa problém s odoslanými dátami. Prosím, skúste sa vratiť a zopakovať akciu."
    50 
    51 #: ../jsdelivr.php:395
     47#: ../jsdelivr.php:406
     48msgid ""
     49"Whoops! There was a problem with the data you posted. Please go back and try "
     50"again."
     51msgstr ""
     52"Hopla! Objavil sa problém s odoslanými dátami. Prosím, skúste sa vratiť a "
     53"zopakovať akciu."
     54
     55#: ../jsdelivr.php:443
    5256msgid "Settings were sucessfully saved."
    5357msgstr "Nastavenia boli úspešné uložené."
     58
     59#: ../jsdelivr.php:555
     60msgid ""
     61"Cannot get content from remove server via function file_get_contents. Please "
     62"check configuration of your server or install CURL."
     63msgstr ""
     64"Nemožem stiahnuť obsah zo vzdialeného servera cez funkciu file_get_contents. "
     65"Prosím skontrolujte nastavenie vášho servera alebo nainštalujte CURL."
     66
     67#: ../jsdelivr.php:603
     68msgid ""
     69"Cannot get content from remote server. Please enable CURL or allow_url_fopen "
     70"with appropriate wrappers or tcp/ssl transports on your server."
     71msgstr ""
     72"Nemožem stiahnuť obsah zo vzdialeného servera. Prosím povoľte CURL, "
     73"allow_url_fopen s príslušnými wrappermi alebo tcp/ssl transportz na vašom "
     74"serveri."
    5475
    5576#: ../backend/debug.php:2
     
    6182msgstr "Reset"
    6283
    63 #: ../backend/options.php:26
     84#: ../backend/options.php:22
    6485msgid "First time, you must"
    6586msgstr "Prvý krát musíte"
    6687
    67 #: ../backend/options.php:27
    68 #: ../backend/update_notice.php:8
     88#: ../backend/options.php:23 ../backend/update_notice.php:8
    6989msgid "Update CDN data"
    7090msgstr "Aktualizovať CDN dáta"
    7191
    72 #: ../backend/options.php:27
    73 #: ../backend/update_notice.php:8
     92#: ../backend/options.php:23 ../backend/update_notice.php:8
    7493msgid "update CDN data"
    7594msgstr "aktualizovať CDN dáta"
    7695
    77 #: ../backend/options.php:28
    78 msgid "Then you will be able scan your website and activate CDN service for appropriate files."
    79 msgstr "Potom budete môcť skenovať vašu webovú stránku a aktivovať CDN služby pre príslušné súbory."
    80 
    81 #: ../backend/options.php:39
     96#: ../backend/options.php:24
     97msgid ""
     98"Then you will be able scan your website and activate CDN service for "
     99"appropriate files."
     100msgstr ""
     101"Potom budete môcť skenovať vašu webovú stránku a aktivovať CDN služby pre "
     102"príslušné súbory."
     103
     104#: ../backend/options.php:35
    82105msgid "Now, you can"
    83106msgstr "Teraz môžete"
    84107
    85 #: ../backend/options.php:40
    86 #: ../backend/options.php:65
     108#: ../backend/options.php:36 ../backend/options.php:79
    87109msgid "Scan website"
    88110msgstr "Skenovať webovú stránku"
    89111
    90 #: ../backend/options.php:40
     112#: ../backend/options.php:36
    91113msgid "scan your website"
    92114msgstr "skenovať vašu webovú stránku"
    93115
    94 #: ../backend/options.php:55
    95 #: ../backend/options.php:89
    96 #: ../backend/options.php:196
    97 #: ../backend/options.php:247
     116#: ../backend/options.php:46
     117msgid "An unexpected error occured."
     118msgstr "Objavila sa neočakávaná chyba."
     119
     120#: ../backend/options.php:50
     121msgid "Please report the error message in the box above at"
     122msgstr "Prosím zahláste chybovú správu v rámčeku vyššie na adrese"
     123
     124#: ../backend/options.php:53
     125msgid "You can help us improve the plugin. Thanks."
     126msgstr "Môžete nám pomôcť vylepšiť plugin. Ďakujeme."
     127
     128#: ../backend/options.php:56
     129msgid "Ok, I did it"
     130msgstr "Ok, spravil som to"
     131
     132#: ../backend/options.php:69 ../backend/options.php:103
     133#: ../backend/options.php:210 ../backend/options.php:261
    98134msgid "Disabled"
    99135msgstr "Neaktívne"
    100136
    101 #: ../backend/options.php:56
    102 #: ../backend/options.php:90
    103 #: ../backend/options.php:196
    104 #: ../backend/options.php:248
     137#: ../backend/options.php:70 ../backend/options.php:104
     138#: ../backend/options.php:210 ../backend/options.php:262
    105139msgid "Enabled"
    106140msgstr "Aktívne"
    107141
    108 #: ../backend/options.php:58
    109 #: ../backend/options.php:253
     142#: ../backend/options.php:72 ../backend/options.php:267
    110143msgid "Save all settings"
    111144msgstr "Uložiť všetky nastavenia"
    112145
    113 #: ../backend/options.php:62
     146#: ../backend/options.php:76
    114147msgid "Plugin is enabled"
    115148msgstr "Rozširenie je aktívne."
    116149
    117 #: ../backend/options.php:62
     150#: ../backend/options.php:76
    118151msgid "Plugin is disabled"
    119152msgstr "Rozširenie je neaktívne."
    120153
    121 #: ../backend/options.php:72
    122 #: ../backend/options.php:230
     154#: ../backend/options.php:86 ../backend/options.php:244
    123155msgid "Bulk actions"
    124156msgstr "Hromadné akcie"
    125157
    126 #: ../backend/options.php:73
    127 #: ../backend/options.php:148
    128 #: ../backend/options.php:231
     158#: ../backend/options.php:87 ../backend/options.php:162
     159#: ../backend/options.php:245
    129160msgid "Script load"
    130161msgstr "Nacítanie skriptu"
    131162
    132 #: ../backend/options.php:75
    133 #: ../backend/options.php:82
    134 #: ../backend/options.php:88
    135 #: ../backend/options.php:233
    136 #: ../backend/options.php:240
    137 #: ../backend/options.php:246
     163#: ../backend/options.php:89 ../backend/options.php:96
     164#: ../backend/options.php:102 ../backend/options.php:247
     165#: ../backend/options.php:254 ../backend/options.php:260
    138166msgid "Please select"
    139167msgstr "Prosím zvoľte"
    140168
    141 #: ../backend/options.php:76
    142 #: ../backend/options.php:150
    143 #: ../backend/options.php:234
     169#: ../backend/options.php:90 ../backend/options.php:164
     170#: ../backend/options.php:248
    144171msgid "Regular"
    145172msgstr "Regular"
    146173
    147 #: ../backend/options.php:77
    148 #: ../backend/options.php:151
    149 #: ../backend/options.php:235
     174#: ../backend/options.php:91 ../backend/options.php:165
     175#: ../backend/options.php:249
    150176msgid "Async"
    151177msgstr "Async"
    152178
    153 #: ../backend/options.php:78
    154 #: ../backend/options.php:152
    155 #: ../backend/options.php:236
     179#: ../backend/options.php:92 ../backend/options.php:166
     180#: ../backend/options.php:250
    156181msgid "Defer"
    157182msgstr "Defer"
    158183
    159 #: ../backend/options.php:80
    160 #: ../backend/options.php:155
    161 #: ../backend/options.php:238
     184#: ../backend/options.php:94 ../backend/options.php:169
     185#: ../backend/options.php:252
    162186msgid "Move to the footer"
    163187msgstr "Premiestniť do pätičky"
    164188
    165 #: ../backend/options.php:83
    166 #: ../backend/options.php:241
     189#: ../backend/options.php:97 ../backend/options.php:255
    167190msgid "No"
    168191msgstr "Nie"
    169192
    170 #: ../backend/options.php:84
    171 #: ../backend/options.php:242
     193#: ../backend/options.php:98 ../backend/options.php:256
    172194msgid "Yes"
    173195msgstr "Áno"
    174196
    175 #: ../backend/options.php:86
    176 #: ../backend/options.php:101
    177 #: ../backend/options.php:110
    178 #: ../backend/options.php:244
     197#: ../backend/options.php:100 ../backend/options.php:115
     198#: ../backend/options.php:124 ../backend/options.php:258
    179199msgid "Status"
    180200msgstr "Status"
    181201
    182 #: ../backend/options.php:92
    183 #: ../backend/options.php:250
     202#: ../backend/options.php:106 ../backend/options.php:264
    184203msgid "Apply"
    185204msgstr "Aplikovať"
    186205
    187 #: ../backend/options.php:99
    188 #: ../backend/options.php:108
     206#: ../backend/options.php:113 ../backend/options.php:122
    189207msgid "File"
    190208msgstr "Súbor"
    191209
    192 #: ../backend/options.php:100
    193 #: ../backend/options.php:109
     210#: ../backend/options.php:114 ../backend/options.php:123
    194211msgid "Package"
    195212msgstr "Balíček"
    196213
    197 #: ../backend/options.php:102
    198 #: ../backend/options.php:111
     214#: ../backend/options.php:116 ../backend/options.php:125
    199215msgid "Match"
    200216msgstr "Zhoda"
    201217
    202 #: ../backend/options.php:119
     218#: ../backend/options.php:133
    203219msgid "File list is empty."
    204220msgstr "Zoznam súborov je prázdny."
    205221
    206 #: ../backend/options.php:141
    207 #: ../backend/options.php:172
    208 #: ../backend/options.php:180
     222#: ../backend/options.php:155 ../backend/options.php:186
     223#: ../backend/options.php:194
    209224msgid "Version:"
    210225msgstr "Verzia:"
    211226
    212 #: ../backend/options.php:141
     227#: ../backend/options.php:155
    213228msgid "None"
    214229msgstr "Žiadna"
    215230
    216 #: ../backend/options.php:156
     231#: ../backend/options.php:170
    217232msgid "with priority"
    218233msgstr "s prioritou"
    219234
    220 #: ../backend/options.php:171
    221 #: ../backend/options.php:179
     235#: ../backend/options.php:185 ../backend/options.php:193
    222236msgid "Name:"
    223237msgstr "Názov:"
    224238
    225 #: ../backend/options.php:173
     239#: ../backend/options.php:187
    226240msgid "Google Hosted Libraries"
    227241msgstr "Google Hosted Libraries"
    228242
    229 #: ../backend/options.php:181
     243#: ../backend/options.php:195
    230244msgid "Author:"
    231245msgstr "Autor:"
    232246
    233 #: ../backend/options.php:210
     247#: ../backend/options.php:224
    234248msgid "100% Match"
    235249msgstr "100% zhoda"
    236250
    237 #: ../backend/options.php:214
     251#: ../backend/options.php:228
    238252msgid "Same plugin, but maybe different versions"
    239253msgstr "Rovnaké rozširenie, ale možno rozličné verzie."
    240254
    241 #: ../backend/options.php:218
     255#: ../backend/options.php:232
    242256msgid "Not matching"
    243257msgstr "Žiadna zhoda"
     
    263277msgstr "Zamietnuť"
    264278
     279#~ msgid "Overview"
     280#~ msgstr "Prehľad"
  • jsdelivr-wordpress-cdn-plugin/trunk/readme.txt

    r589491 r669227  
    55Requires at least: 3.0
    66Tested up to: 3.4.1
    7 Stable tag: 0.1
     7Stable tag: 0.2
    88
    99The official plugin of jsDelivr.com, a free public CDN. An easy way to integrate the service and speed up your website using our super fast CDN.
     
    1212
    1313This plugin allows you to easily integrate and use the services of [jsDelivr.com](http://www.jsdelivr.com) in your WordPress website.
    14 
    15 [Support](http://jsdelivr.uservoice.com/forums/169238-wordpress-plugin-support) | [Submit Files](http://jsdelivr.uservoice.com/forums/164147-plugins-submission)
    16 
    17 jsDelivr is a free public CDN that hosts javascript libraries and jQuery plugins, including all of the files they need to work (css/png).
    18 It even hosts javascript files that use popular WordPress plugins, like WP SlimStat.
    19 Basically if a lot of websites use it then we probably can host it.
    20 
    21 With this plugin you can automatically integrate our super fast CDN into your website without the trouble of editing your code and searching for the correct URLs.
    2214Just update and then scan your website for files that can be loaded from our CDN.
    23 
    24 **Benefits:**
    25 
    26 *   Speeds up your website
    27 *   Cuts the bandwidth bill
    28 *   Offloads the server from extra requests
    29 
    30 **Features:**
    31 
    32 *   On the fly rewriting of all URLs. No need to change the code.
    33 *   Move selected files to footer
    34 *   Apply Async/Defer loading to your javascripts.
    35 *   Compatible with W3 Total Cache and WP Super Cache
    36 *   Automatic synchronization with our DB.
    37 *   Allows you to select the files you want to load from the CDN
    38 *   Supports HTTPS
    39 *   Uses Google CDN to load jQuery to take advantage of the user's browser cache.
    40 
    41 
    42 
    43 **Contributors:**
    44 
    45 *   Coded by [Martin Sudolsky](http://martin.sudolsky.com/)
    46 *   Banner by [Stratos Iordanidis](http://ssstratos.com/)
     15Features:
     16* On the fly rewriting of all URLs. No need to change the code.
     17* Move selected files to footer
     18* Apply Async/Defer loading to your javascripts.
     19* Compatible with W3 Total Cache and WP Super Cache
     20* Automatic synchronization with our DB.
     21* Allows you to select the files you want to load from the CDN
     22* Supports HTTPS
     23* Uses Google CDN to load jQuery to take advantage of the user's browser cache.
    4724
    4825== Installation ==
     
    52293. Go to Settings-> jsDelivr CDN and follow the instructions
    5330
    54 == Screenshots ==
    55 1. First time screen
    56 2. Settings menu after update and scan are finished. Move to footer is enabled.
    5731
    5832== Frequently Asked Questions ==
     
    6135The priority works only when the files are moved to footer.
    6236Zero has the highest priority. So for example you can give to jQuery the priority 0 then to a plugin priority 1 and if the plugins has javascript addons then 2,3,4,5...
    63 
    64 This ensures that there will be no problems with undeclared functions etc.
     37This ensures that there will be no problems with undeclared functions etc...
    6538If you leave the priority as is then the files will be moved to footer with the same order they were originally declared.
    6639
    6740= What does the yellow match mean? =
    6841You have to be careful with those. It can be two things.
    69 
    70 *   It can be a more recent version of the same file you are using. In this case you must make sure that the newer version wont break anything. You can enable it temporary and test it.
    71 *   It can be a similar file (from the plugin's perspective) from an other package. Again you will have to test it to be sure.
     421. It can be a more recent version of the same file you are using. In this case you must make sure that the newer version wont break anything. You can enable it temporary and test it.
     432. It can be a similar file (from the plugin's perspective) from an other package. Again you will have to test it to be sure.
    7244
    7345= I get a 100% matching file but the name of the package is wrong =
     
    7749
    7850
     51
     52
    7953== Changelog ==
     54
     55= 0.2 =
     56* Some misc. changes
     57* Solved the problem with infinity scanning (added better error handling)
     58* Added alternative method to CURL via file_get_contents (if http wrapper and allow_url_fopen is enabled) or fsockopen
     59* Updated versions of google hosted files (I did it only up to 1.8.3, because it seems that many scripts are unstable with jQuery 1.9.x)
     60* Fixed issue with problematic detection of protocol used on webserver (http or https)
     61* Fixed regular expressions (problems with search)
     62* Images are parsed by extension (so I added list of supported extensions)
     63
     64
    8065
    8166= 0.1 =
Note: See TracChangeset for help on using the changeset viewer.