Crayon Syntax Highlighter - Version 1.10.0

Version Description

Make sure to upgrade to the latest release when possible to ensure you avoid bugs others have found and enjoy new features.

Download this release

Release Info

Developer akarmenia
Plugin Icon wp plugin Crayon Syntax Highlighter
Version 1.10.0
Comparing to
See all releases

Code changes from version 1.9.11 to 1.10.0

.gitignore ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ .svn
2
+ # .project
3
+ Thumbs.db
4
+ .DS_Store*
5
+ # .settings
6
+ # .buildpath
crayon_formatter.class.php CHANGED
@@ -314,7 +314,7 @@ class CrayonFormatter {
314
  $readonly = $touch ? '' : 'readonly';
315
  $print_plain = $print_plain_button = '';
316
  // TODO remove wrap
317
- $print_plain = '<textarea wrap="off" class="crayon-plain print-no" data-settings="' . $plain_settings . '" '. $readonly .' style="' . $plain_style .' '. $font_style . '">' . $hl->code() . '</textarea>';
318
  } else {
319
  $print_plain = $plain_settings = $plain_settings = '';
320
  }
314
  $readonly = $touch ? '' : 'readonly';
315
  $print_plain = $print_plain_button = '';
316
  // TODO remove wrap
317
+ $print_plain = '<textarea wrap="off" class="crayon-plain print-no" data-settings="' . $plain_settings . '" '. $readonly .' style="' . $plain_style .' '. $font_style . '">' . self::clean_code($hl->code()) . '</textarea>';
318
  } else {
319
  $print_plain = $plain_settings = $plain_settings = '';
320
  }
crayon_highlighter.class.php CHANGED
@@ -40,6 +40,7 @@ class CrayonHighlighter {
40
  if ($url !== NULL) {
41
  $this->url($url);
42
  }
 
43
  if ($language !== NULL) {
44
  $this->language($language);
45
  }
@@ -154,7 +155,9 @@ class CrayonHighlighter {
154
  }
155
 
156
  if ($this->language === NULL) {
157
- $this->language($this->setting_val(CrayonSettings::FALLBACK_LANG));
 
 
158
  }
159
  if ($this->needs_format) {
160
  $tmr->start();
@@ -240,16 +243,20 @@ class CrayonHighlighter {
240
  // Set the language if it exists or look for an alias
241
  $this->language = $lang;
242
  } else {
243
- // Attempt to detect the language
244
- if (!empty($id)) {
245
- $this->log("The language '$id' could not be loaded.");
246
- }
247
- $this->language = CrayonResources::langs()->detect($this->url, $this->setting_val(CrayonSettings::FALLBACK_LANG));
248
  }
249
 
250
  // Prepare the language for use, even if we have no code, we need the name
251
  CrayonParser::parse($this->language->id());
252
  }
 
 
 
 
 
 
 
 
253
 
254
  function url($url = NULL) {
255
  if ($url === NULL) {
40
  if ($url !== NULL) {
41
  $this->url($url);
42
  }
43
+
44
  if ($language !== NULL) {
45
  $this->language($language);
46
  }
155
  }
156
 
157
  if ($this->language === NULL) {
158
+ $this->language_detect();
159
+ // $this->language($this->setting_val(CrayonSettings::FALLBACK_LANG));
160
+ // $this->language(NULL);
161
  }
162
  if ($this->needs_format) {
163
  $tmr->start();
243
  // Set the language if it exists or look for an alias
244
  $this->language = $lang;
245
  } else {
246
+ $this->language_detect();
 
 
 
 
247
  }
248
 
249
  // Prepare the language for use, even if we have no code, we need the name
250
  CrayonParser::parse($this->language->id());
251
  }
252
+
253
+ function language_detect() {
254
+ // Attempt to detect the language
255
+ if (!empty($id)) {
256
+ $this->log("The language '$id' could not be loaded.");
257
+ }
258
+ $this->language = CrayonResources::langs()->detect($this->url, $this->setting_val(CrayonSettings::FALLBACK_LANG));
259
+ }
260
 
261
  function url($url = NULL) {
262
  if ($url === NULL) {
crayon_langs.class.php CHANGED
@@ -212,6 +212,17 @@ class CrayonLangs extends CrayonResourceCollection {
212
  return $this->fetch(CrayonLangsResourceType::DELIMITER, $reload);
213
  }
214
 
 
 
 
 
 
 
 
 
 
 
 
215
  public function ids_and_aliases($reload = FALSE) {
216
  $fetch = $this->fetch(CrayonLangsResourceType::ALIAS, $reload, TRUE);
217
  foreach ($fetch as $id=>$alias_array) {
212
  return $this->fetch(CrayonLangsResourceType::DELIMITER, $reload);
213
  }
214
 
215
+ public function extensions_inverted($reload = FALSE) {
216
+ $extensions = $this->extensions($reload);
217
+ $inverted = array();
218
+ foreach ($extensions as $lang=>$exts) {
219
+ foreach ($exts as $ext) {
220
+ $inverted[$ext] = $lang;
221
+ }
222
+ }
223
+ return $inverted;
224
+ }
225
+
226
  public function ids_and_aliases($reload = FALSE) {
227
  $fetch = $this->fetch(CrayonLangsResourceType::ALIAS, $reload, TRUE);
228
  foreach ($fetch as $id=>$alias_array) {
crayon_settings_wp.class.php CHANGED
@@ -773,8 +773,10 @@ class CrayonSettingsWP {
773
  $date = $CRAYON_DATE;
774
  $developer = '<strong>'.crayon__('Developer').':</strong> ' . '<a href="'.$CRAYON_AUTHOR_SITE.'" target="_blank">' . $CRAYON_AUTHOR . '</a>';
775
  $translators = '<strong>'.crayon__('Translators').':</strong> ' .
776
- 'Chinese (<a href="http://smerpup.com/" target="_blank">Dezhi Liu</a>, <a href="http://neverno.me/" target="_blank">Jash Yin</a>),
 
777
  German (<a href="http://www.technologyblog.de/" target="_blank">Stephan Knau&#223;</a>),
 
778
  Lithuanian (<a href="http://www.host1free.com" target="_blank">Vincent G</a>),
779
  Japanese (<a href="https://twitter.com/#!/west_323" target="_blank">@west_323</a>),
780
  Russian (<a href="http://simplelib.com/" target="_blank">Minimus</a>, <a href="http://atlocal.net/" target="_blank">Di_Skyer</a>),
773
  $date = $CRAYON_DATE;
774
  $developer = '<strong>'.crayon__('Developer').':</strong> ' . '<a href="'.$CRAYON_AUTHOR_SITE.'" target="_blank">' . $CRAYON_AUTHOR . '</a>';
775
  $translators = '<strong>'.crayon__('Translators').':</strong> ' .
776
+ 'Chinese (<a href="http://smerpup.com/" target="_blank">Dezhi Liu</a>, <a href="http://neverno.me/" target="_blank">Jash Yin</a>),
777
+ Dutch (<a href="https://twitter.com/#!/chilionsnoek" target="_blank">Chilion Snoek</a>),
778
  German (<a href="http://www.technologyblog.de/" target="_blank">Stephan Knau&#223;</a>),
779
+ Italian (<a href="http://www.federicobellucci.net/" target="_blank">Federico Bellucci</a>),
780
  Lithuanian (<a href="http://www.host1free.com" target="_blank">Vincent G</a>),
781
  Japanese (<a href="https://twitter.com/#!/west_323" target="_blank">@west_323</a>),
782
  Russian (<a href="http://simplelib.com/" target="_blank">Minimus</a>, <a href="http://atlocal.net/" target="_blank">Di_Skyer</a>),
crayon_wp.class.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Crayon Syntax Highlighter
4
  Plugin URI: http://ak.net84.net/projects/crayon-syntax-highlighter
5
  Description: Supports multiple languages, themes, highlighting from a URL, local file or post text.
6
- Version: 1.9.11
7
  Author: Aram Kocharyan
8
  Author URI: http://ak.net84.net/
9
  Text Domain: crayon-syntax-highlighter
@@ -240,8 +240,6 @@ class CrayonWP {
240
  // Only include if a post exists with Crayon tag
241
  preg_match_all(self::regex(), $wp_content, $matches);
242
 
243
- // We need to escape ignored Crayons, since they won't be captured
244
- $wp_content = self::crayon_remove_ignore($wp_content);
245
  CrayonLog::debug('capture ignore for id ' . $wp_id . ' : ' . strlen($capture['content']) . ' vs ' . strlen($wp_content));
246
 
247
  if ( count($matches[0]) != 0 ) {
@@ -324,6 +322,7 @@ class CrayonWP {
324
  }
325
 
326
  // Add array of atts and content to post queue with key as post ID
 
327
  $id = !empty($open_ids[$i]) ? $open_ids[$i] : $closed_ids[$i];
328
  $code = self::crayon_remove_ignore($contents[$i]);
329
  $capture['capture'][$id] = array('post_id'=>$wp_id, 'atts'=>$atts_array, 'code'=>$code);
@@ -334,6 +333,10 @@ class CrayonWP {
334
 
335
  }
336
 
 
 
 
 
337
  // Convert `` backquote tags into <code></code>, if needed
338
  // XXX Some code may contain `` so must do it after all Crayons are captured
339
  if (CrayonGlobalSettings::val(CrayonSettings::BACKQUOTE)) {
@@ -614,9 +617,10 @@ class CrayonWP {
614
  $content = $matches[6];
615
 
616
  // If we find a crayon=false in the attributes, or a crayon[:_]false in the class, then we should not capture
617
- $ignore_regex = '#crayon\s*=\s*(["\'])\s*(false|no|0)\s*\1#msi';
618
- if (preg_match($ignore_regex, $atts) !== 0 ||
619
- preg_match($ignore_regex, $class) !== 0 ) {
 
620
  return $matches[0];
621
  }
622
 
@@ -681,8 +685,9 @@ class CrayonWP {
681
  if (CrayonGlobalSettings::val(CrayonSettings::CAPTURE_MINI_TAG) ||
682
  CrayonGlobalSettings::val(CrayonSettings::INLINE_TAG)) {
683
  self::init_tags_regex();
684
- $the_content = preg_replace('#'.$ignore_flag_regex.'\s*([\[\{])\s*('. self::$alias_regex .')#', '$1$2', $the_content);
685
- $the_content = preg_replace('#('. self::$alias_regex .')\s*([\]\}])\s*'.$ignore_flag_regex.'#', '$1$2', $the_content);
 
686
  }
687
  if (CrayonGlobalSettings::val(CrayonSettings::BACKQUOTE)) {
688
  $the_content = str_ireplace('\\`', '`', $the_content);
3
  Plugin Name: Crayon Syntax Highlighter
4
  Plugin URI: http://ak.net84.net/projects/crayon-syntax-highlighter
5
  Description: Supports multiple languages, themes, highlighting from a URL, local file or post text.
6
+ Version: 1.10
7
  Author: Aram Kocharyan
8
  Author URI: http://ak.net84.net/
9
  Text Domain: crayon-syntax-highlighter
240
  // Only include if a post exists with Crayon tag
241
  preg_match_all(self::regex(), $wp_content, $matches);
242
 
 
 
243
  CrayonLog::debug('capture ignore for id ' . $wp_id . ' : ' . strlen($capture['content']) . ' vs ' . strlen($wp_content));
244
 
245
  if ( count($matches[0]) != 0 ) {
322
  }
323
 
324
  // Add array of atts and content to post queue with key as post ID
325
+ // XXX If at this point no ID is added we have failed!
326
  $id = !empty($open_ids[$i]) ? $open_ids[$i] : $closed_ids[$i];
327
  $code = self::crayon_remove_ignore($contents[$i]);
328
  $capture['capture'][$id] = array('post_id'=>$wp_id, 'atts'=>$atts_array, 'code'=>$code);
333
 
334
  }
335
 
336
+ // We need to escape ignored Crayons, since they won't be captured
337
+ // XXX Do this after replacing the Crayon with the shorter ID tag, otherwise $full_matches will be different from $wp_content
338
+ $wp_content = self::crayon_remove_ignore($wp_content);
339
+
340
  // Convert `` backquote tags into <code></code>, if needed
341
  // XXX Some code may contain `` so must do it after all Crayons are captured
342
  if (CrayonGlobalSettings::val(CrayonSettings::BACKQUOTE)) {
617
  $content = $matches[6];
618
 
619
  // If we find a crayon=false in the attributes, or a crayon[:_]false in the class, then we should not capture
620
+ $ignore_regex_atts = '#crayon\s*=\s*(["\'])\s*(false|no|0)\s*\1#msi';
621
+ $ignore_regex_class = '#crayon\s*[:_]\s*(false|no|0)#msi';
622
+ if (preg_match($ignore_regex_atts, $atts) !== 0 ||
623
+ preg_match($ignore_regex_class, $class) !== 0 ) {
624
  return $matches[0];
625
  }
626
 
685
  if (CrayonGlobalSettings::val(CrayonSettings::CAPTURE_MINI_TAG) ||
686
  CrayonGlobalSettings::val(CrayonSettings::INLINE_TAG)) {
687
  self::init_tags_regex();
688
+ // $the_content = preg_replace('#'.$ignore_flag_regex.'\s*([\[\{])\s*('. self::$alias_regex .')#', '$1$2', $the_content);
689
+ // $the_content = preg_replace('#('. self::$alias_regex .')\s*([\]\}])\s*'.$ignore_flag_regex.'#', '$1$2', $the_content);
690
+ $the_content = preg_replace('#'.$ignore_flag_regex.'(\s*[\[\{]\s*('. self::$alias_regex .')[^\]]*[\]\}])#', '$1', $the_content);
691
  }
692
  if (CrayonGlobalSettings::val(CrayonSettings::BACKQUOTE)) {
693
  $the_content = str_ireplace('\\`', '`', $the_content);
js/crayon.js CHANGED
@@ -1,774 +1,777 @@
1
  // Crayon Syntax Highlighter JavaScript
2
 
3
- // BEGIN AUXILIARY FUNCTIONS
4
 
5
- jQuery.fn.exists = function () {
6
- return this.length !== 0;
7
- };
8
-
9
- // This makes IE < 9 doesn't support CSSStyleDeclaration, can't use this
10
- var CrayonSyntaxUnused = function () {
11
- // For those who need them (< IE 9), add support for CSS functions
12
- var isStyleFuncSupported = null;
13
- if (typeof(CSSStyleDeclaration) != 'undefined') {
14
- isStyleFuncSupported = CSSStyleDeclaration.prototype.getPropertyValue != null;
15
- if (!isStyleFuncSupported) {
16
- CSSStyleDeclaration.prototype.getPropertyValue = function(a) {
17
- return this.getAttribute(a);
18
- };
19
- CSSStyleDeclaration.prototype.setProperty = function(styleName, value, priority) {
20
- this.setAttribute(styleName,value);
21
- var priority = typeof priority != 'undefined' ? priority : '';
22
- if (priority != '') {
23
- // Add priority manually
24
- var rule = new RegExp(RegExp.escape(styleName) + '\\s*:\\s*' + RegExp.escape(value) + '(\\s*;)?', 'gmi');
25
- this.cssText = this.cssText.replace(rule, styleName + ': ' + value + ' !' + priority + ';');
26
- }
27
- };
28
- CSSStyleDeclaration.prototype.removeProperty = function(a) {
29
- return this.removeAttribute(a);
30
- };
31
- CSSStyleDeclaration.prototype.getPropertyPriority = function(styleName) {
32
- var rule = new RegExp(RegExp.escape(styleName) + '\\s*:\\s*[^\\s]*\\s*!important(\\s*;)?', 'gmi');
33
- return rule.test(this.cssText) ? 'important' : '';
34
- };
35
- }
36
- }
37
- };
38
-
39
- // Escape regex chars with \
40
- RegExp.escape = function(text) {
41
- return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
42
- };
43
-
44
-
45
- var hasCSSStyleDeclaration = typeof(CSSStyleDeclaration) != 'undefined';
46
- jQuery.fn.style = function(styleName, value, priority) {
47
- // DOM node
48
- var node = this.get(0);
49
- // Ensure we have a DOM node
50
- if (typeof node == 'undefined') {
51
- return;
52
- }
53
- // CSSStyleDeclaration
54
- var style = node.style;
55
- // Getter/Setter
56
- if (typeof styleName != 'undefined') {
57
- if (typeof value != 'undefined') {
58
- // Set style property
59
- var priority = typeof priority != 'undefined' ? priority : '';
60
- if (typeof style.setProperty != 'undefined') {
61
- style.setProperty(styleName, value, priority);
62
- } else {
63
- style.styleName = value + ' ' + priority;
64
- }
65
- } else {
66
- // Get style property
67
- if (hasCSSStyleDeclaration) {
68
- return style.getPropertyValue(styleName);
69
- } else {
70
- return style.styleName;
71
- }
72
- }
73
- } else {
74
- // Get CSSStyleDeclaration
75
- return style;
76
- }
77
- };
78
-
79
- // END AUXILIARY FUNCTIONS
80
-
81
- var PRESSED = 'crayon-pressed';
82
- var UNPRESSED = '';
83
-
84
- var CRAYON_SYNTAX = 'div.crayon-syntax';
85
- var CRAYON_TOOLBAR = '.crayon-toolbar';
86
- var CRAYON_INFO = '.crayon-info';
87
- var CRAYON_PLAIN = '.crayon-plain';
88
- var CRAYON_MAIN = '.crayon-main';
89
- var CRAYON_TABLE = '.crayon-table';
90
- var CRAYON_CODE = '.crayon-code';
91
- var CRAYON_NUMS = '.crayon-nums';
92
- var CRAYON_NUMS_CONTENT = '.crayon-nums-content';
93
- var CRAYON_NUMS_BUTTON = '.crayon-nums-button';
94
- var CRAYON_POPUP_BUTTON = '.crayon-popup-button';
95
- var CRAYON_COPY_BUTTON = '.crayon-copy-button';
96
- var CRAYON_PLAIN_BUTTON = '.crayon-plain-button';
97
-
98
- jQuery(document).ready(function() {
99
- CrayonSyntax.init();
100
- });
101
-
102
- var CrayonSyntax = new function() {
103
- var crayon = new Object();
104
- var currUID = 0;
105
 
106
- this.init = function() {
107
- if (typeof crayon == 'undefined') {
108
- crayon = new Object();
109
- }
110
-
111
- jQuery(CRAYON_SYNTAX).each(function() {
112
- CrayonSyntax.process(this);
113
- });
114
  };
115
-
116
- this.process = function(c, replace) {
117
- c = jQuery(c);
118
- var uid = c.attr('id');
119
- if (uid == 'crayon-') {
120
- // No ID, generate one
121
- uid += getUID();
122
- }
123
- c.attr('id', uid);
124
- console_log(uid);
125
-
126
- if (typeof replace == 'undefined') {
127
- replace = false;
128
- }
129
-
130
- if (!replace && !make_uid(uid)) {
131
- // Already a Crayon
132
- return;
133
- }
134
-
135
- var toolbar = c.find(CRAYON_TOOLBAR);
136
- var info = c.find(CRAYON_INFO);
137
- var plain = c.find(CRAYON_PLAIN);
138
- var main = c.find(CRAYON_MAIN);
139
- var table = c.find(CRAYON_TABLE);
140
- var code = c.find(CRAYON_CODE);
141
- var nums = c.find(CRAYON_NUMS);
142
- var nums_content = c.find(CRAYON_NUMS_CONTENT);
143
- var nums_button = c.find(CRAYON_NUMS_BUTTON);
144
- var popup_button = c.find(CRAYON_POPUP_BUTTON);
145
- var copy_button = c.find(CRAYON_COPY_BUTTON);
146
- var plain_button = c.find(CRAYON_PLAIN_BUTTON);
147
-
148
- crayon[uid] = c;
149
- crayon[uid].toolbar = toolbar;
150
- crayon[uid].plain = plain;
151
- crayon[uid].info = info;
152
- crayon[uid].main = main;
153
- crayon[uid].table = table;
154
- crayon[uid].code = code;
155
- crayon[uid].nums = nums;
156
- crayon[uid].nums_content = nums_content;
157
- crayon[uid].nums_button = nums_button;
158
- crayon[uid].popup_button = popup_button;
159
- crayon[uid].copy_button = copy_button;
160
- crayon[uid].plain_button = plain_button;
161
- crayon[uid].nums_visible = true;
162
- crayon[uid].plain_visible = false;
163
-
164
- crayon[uid].toolbar_delay = 0;
165
- crayon[uid].time = 1;
166
-
167
- // Set plain
168
- jQuery(CRAYON_PLAIN).css('z-index', 0);
169
-
170
- // XXX Remember CSS dimensions
171
- var main_style = main.style();
172
- crayon[uid].main_style = {
173
- height: main_style && main_style.height || '',
174
- max_height: main_style && main_style.maxHeight || '',
175
- min_height: main_style && main_style.minHeight || '',
176
- width: main_style && main_style.width || ''
177
- };
178
-
179
- var load_timer;
180
- var i = 0;
181
- crayon[uid].loading = true;
182
- crayon[uid].scroll_block_fix = false;
183
-
184
- // Register click events
185
- nums_button.click(function() { CrayonSyntax.toggle_nums(uid); });
186
- plain_button.click(function() { CrayonSyntax.toggle_plain(uid); });
187
- copy_button.click(function() { CrayonSyntax.copy_plain(uid); });
188
-
189
- var load_func = function() {
190
- if (main.height() < 30) {
191
- crayon[uid].scroll_block_fix = true;
192
- }
193
-
194
- // reconsile_dimensions(uid);
195
-
196
- // If nums hidden by default
197
- if (nums.filter('[data-settings~="hide"]').length != 0) {
198
- nums_content.ready(function() {
199
- console_log('function' + uid);
200
- CrayonSyntax.toggle_nums(uid, true, true);
201
- });
202
- } else {
203
- update_nums_button(uid);
204
- }
205
-
206
- // TODO If width has changed or timeout, stop timer
207
- if (/*last_num_width != nums.width() ||*/ i == 5) {
208
- clearInterval(load_timer);
209
- crayon[uid].loading = false;
210
- }
211
- i++;
212
- };
213
- // main.ready(function() {
214
- // alert();
215
- load_timer = setInterval(load_func, 300);
216
- fix_scroll_blank(uid);
217
- // });
218
-
219
- // Used for toggling
220
- main.css('position', 'relative');
221
- main.css('z-index', 1);
222
-
223
- // Update clickable buttons
224
- update_nums_button(uid);
225
- update_plain_button(uid);
226
-
227
- // Disable certain features for touchscreen devices
228
- touchscreen = (c.filter('[data-settings~="touchscreen"]').length != 0);
229
-
230
- // Used to hide info
231
- if (!touchscreen) {
232
- main.click(function() { crayon_info(uid, '', false); });
233
- plain.click(function() { crayon_info(uid, '', false); });
234
- info.click(function() { crayon_info(uid, '', false); });
235
- }
236
-
237
- // Used for code popup
238
- crayon[uid].popup_settings = popupWindow(popup_button, {
239
- height:screen.height - 200,
240
- width:screen.width - 100,
241
- top:75,
242
- left:50,
243
- scrollbars:1,
244
- windowURL:'',
245
- data:'' // Data overrides URL
246
- }, function() {
247
- code_popup(uid);
248
- }, function() {
249
- //console_log('after');
250
- });
251
-
252
- plain.css('opacity', 0);
253
- // If a toolbar with mouseover was found
254
- if (toolbar.filter('[data-settings~="mouseover"]').length != 0 && !touchscreen) {
255
- crayon[uid].toolbar_mouseover = true;
256
-
257
- toolbar.css('margin-top', '-' + toolbar.height() + 'px');
258
- toolbar.hide();
259
- // Overlay the toolbar if needed, only if doing so will not hide the
260
- // whole code!
261
- if (toolbar.filter('[data-settings~="overlay"]').length != 0
262
- && main.height() > toolbar.height() * 2) {
263
- toolbar.css('position', 'absolute');
264
- toolbar.css('z-index', 2);
265
- // Hide on single click when overlayed
266
- if (toolbar.filter('[data-settings~="hide"]').length != 0) {
267
- main.click(function() { toolbar_toggle(uid, undefined, undefined, 0); });
268
- plain.click(function() { toolbar_toggle(uid, false, undefined, 0); });
269
- }
270
- } else {
271
- toolbar.css('z-index', 4);
272
- }
273
- // Enable delay on mouseout
274
- if (toolbar.filter('[data-settings~="delay"]').length != 0) {
275
- crayon[uid].toolbar_delay = 500;
276
- }
277
- // Use .hover() for chrome, but in firefox mouseover/mouseout worked best
278
- c.mouseenter(function() { toolbar_toggle(uid, true); })
279
- .mouseleave(function() { toolbar_toggle(uid, false); });
280
-
281
- } else if (touchscreen) {
282
- toolbar.show();
283
- }
284
- // Plain show events
285
- if (plain.length != 0 && !touchscreen) {
286
- if (plain.filter('[data-settings~="dblclick"]').length != 0) {
287
- main.dblclick(function() { CrayonSyntax.toggle_plain(uid); });
288
- } else if (plain.filter('[data-settings~="click"]').length != 0) {
289
- main.click(function() { CrayonSyntax.toggle_plain(uid); });
290
- } else if (plain.filter('[data-settings~="mouseover"]').length != 0) {
291
- c.mouseenter(function() { CrayonSyntax.toggle_plain(uid, true); })
292
- .mouseleave(function() { CrayonSyntax.toggle_plain(uid, false); });
293
- nums_button.hide();
294
- }
295
- if (plain.filter('[data-settings~="show-plain-default"]').length != 0) {
296
- // XXX
297
- CrayonSyntax.toggle_plain(uid, true);
298
- }
299
- }
300
- // Scrollbar show events
301
- if (!touchscreen && c.filter('[data-settings~="scroll-mouseover"]').length != 0) {
302
- // Disable on touchscreen devices and when set to mouseover
303
- main.css('overflow', 'hidden');
304
- plain.css('overflow', 'hidden');
305
-
306
- console_log(plain.css('overflow'));
307
-
308
- c.mouseenter(function() { toggle_scroll(uid, true); })
309
- .mouseleave(function() { toggle_scroll(uid, false); });
310
- }
311
- // Disable animations
312
- if ( c.filter('[data-settings~="disable-anim"]').length != 0 ) {
313
- crayon[uid].time = 0;
314
- }
315
-
316
- // Determine if Mac
317
- crayon[uid].mac = c.hasClass('crayon-os-mac');
318
  };
319
 
320
- var make_uid = function(uid) {
321
- console_log(crayon);
322
- if (typeof crayon[uid] == 'undefined') {
323
- crayon[uid] = jQuery('#'+uid);
324
- console_log('make ' + uid);
325
- return true;
326
- }
327
-
328
- console_log('no make ' + uid);
329
- return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
330
  };
331
 
332
- var getUID = function() {
333
- return currUID++;
334
- };
335
 
336
- var code_popup = function(uid) {
337
- if (typeof crayon[uid] == 'undefined') {
338
- return make_uid(uid);
339
- }
340
- var code = crayon[uid].plain_visible ? crayon[uid].plain : crayon[uid].main;
341
- var settings = crayon[uid].popup_settings;
342
- settings.data = get_all_css() + '<body style="padding:0; margin:0;"><div class="' + crayon[uid].attr('class') +
343
- ' crayon-popup">' + remove_css_inline(get_jquery_str(code)) + '</div></body>';
344
- if (typeof settings == 'undefined') {
345
- return;
346
- }
347
- };
348
 
349
- var get_jquery_str = function(object) {
350
- return jQuery('<div>').append(object.clone()).remove().html();
351
- };
 
 
 
 
 
 
 
 
 
 
352
 
353
- var remove_css_inline = function(string) {
354
- return string.replace(/style\s*=\s*["'][^"]+["']/gmi, '');
355
- };
356
 
357
- // Get all CSS on the page as a string
358
- var get_all_css = function() {
359
- var css_str = '';
360
- css = jQuery('link[rel="stylesheet"]').each(function() {
361
- var string = get_jquery_str(jQuery(this));
362
- css_str += string;
363
- });
364
- return css_str;
365
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
366
 
367
- this.copy_plain = function(uid, hover) {
368
- if (typeof crayon[uid] == 'undefined') {
369
- return make_uid(uid);
370
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
371
 
372
- var plain = crayon[uid].plain;
 
 
 
 
 
 
 
 
 
 
373
 
374
- this.toggle_plain(uid, true, true);
375
- toolbar_toggle(uid, true);
 
376
 
377
- key = crayon[uid].mac ? '\u2318' : 'CTRL';
378
- var text = crayon[uid].copy_button.attr('data-text');
379
- text = text.replace(/%s/, key + '+C');
380
- text = text.replace(/%s/, key + '+V');
381
- crayon_info(uid, text);
382
- return false;
383
- };
384
-
385
- var crayon_info = function(uid, text, show) {
386
- if (typeof crayon[uid] == 'undefined') {
387
- return make_uid(uid);
388
- }
389
 
390
- var info = crayon[uid].info;
 
 
391
 
392
- if (typeof text == 'undefined') {
393
- text = '';
394
- }
395
- if (typeof show == 'undefined') {
396
- show = true;
397
- }
398
 
399
- if (crayon_is_slide_hidden(info) && show) {
400
- info.html('<div>' + text + '</div>');
401
- info.css('margin-top', -info.height());
402
- info.show();
403
- crayon_slide(uid, info, true);
404
- setTimeout(function() {
405
- crayon_slide(uid, info, false);
406
- }, 5000);
407
- }
408
 
409
- if (!show) {
410
- crayon_slide(uid, info, false);
411
- }
412
-
413
- };
414
-
415
- var crayon_is_slide_hidden = function(object) {
416
- var object_neg_height = '-' + object.height() + 'px';
417
- if (object.css('margin-top') == object_neg_height || object.css('display') == 'none') {
418
- return true;
419
- } else {
420
- return false;
421
- }
422
- };
423
-
424
- var crayon_slide = function(uid, object, show, anim_time, hide_delay) {
425
- var object_neg_height = '-' + object.height() + 'px';
426
 
427
- if (typeof show == 'undefined') {
428
- if (crayon_is_slide_hidden(object)) {
429
- show = true;
430
- } else {
431
- show = false;
432
- }
433
- }
434
- // Instant means no time delay for showing/hiding
435
- if (typeof anim_time == 'undefined') {
436
- anim_time = 100;
437
- }
438
- if (anim_time == false) {
439
- anim_time = false;
440
- }
441
- if (typeof hide_delay== 'undefined') {
442
- hide_delay = 0;
443
- }
444
- object.stop(true);
445
- if (show == true) {
446
- object.show();
447
- object.animate({
448
- marginTop: 0
449
- }, animt(anim_time, uid));
450
- } else if (show == false) {
451
- // Delay if fully visible
452
- if (/*instant == false && */object.css('margin-top') == '0px' && hide_delay) {
453
- object.delay(hide_delay);
454
- }
455
- object.animate({
456
- marginTop: object_neg_height
457
- }, animt(anim_time, uid), function() {
458
- object.hide();
459
- });
460
- }
461
- };
462
-
463
- this.toggle_plain = function(uid, hover, select) {
464
- if (typeof crayon[uid] == 'undefined') {
465
- return make_uid(uid);
466
- }
467
-
468
- var main = crayon[uid].main;
469
- var plain = crayon[uid].plain;
470
-
471
- if ( (main.is(':animated') || plain.is(':animated')) && typeof hover == 'undefined' ) {
472
- return;
473
- }
474
-
475
- reconsile_dimensions(uid);
476
-
477
- var visible, hidden;
478
- if (typeof hover != 'undefined') {
479
- if (hover) {
480
- visible = main;
481
- hidden = plain;
482
- } else {
483
- visible = plain;
484
- hidden = main;
485
- }
486
- } else {
487
- if (main.css('z-index') == 1) {
488
- visible = main;
489
- hidden = plain;
490
- } else {
491
- visible = plain;
492
- hidden = main;
493
- }
494
- }
495
-
496
- crayon[uid].plain_visible = (hidden == plain);
497
-
498
- // Remember scroll positions of visible
499
- crayon[uid].top = visible.scrollTop();
500
- crayon[uid].left = visible.scrollLeft();
501
 
502
- /* Used to detect a change in overflow when the mouse moves out
503
- * of the Crayon. If it does, then overflow has already been changed,
504
- * no need to revert it after toggling plain. */
505
- crayon[uid].scroll_changed = false;
506
 
507
- // Hide scrollbars during toggle to avoid Chrome weird draw error
508
- // visible.css('overflow', 'hidden');
509
- // hidden.css('overflow', 'hidden');
 
 
 
 
 
510
 
511
- fix_scroll_blank(uid);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
512
 
513
- // Show hidden, hide visible
514
- visible.stop(true);
515
- visible.fadeTo(animt(500, uid), 0,
516
- function() {
517
- visible.css('z-index', 0);
518
- // if (!crayon[uid].scroll_changed) {
519
- // visible.css('overflow', vis_over);
520
- // }
521
- });
522
- hidden.stop(true);
523
- hidden.fadeTo(animt(500, uid), 1,
524
- function() {
525
- hidden.css('z-index', 1);
526
- // if (!crayon[uid].scroll_changed) {
527
- // hidden.css('overflow', hid_over);
528
- // }
529
-
530
- // Give focus to plain code
531
- if (hidden == plain) {
532
- if (select) {
533
- plain.select();
534
- } else {
535
- // XXX not needed
536
- // plain.focus();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
537
  }
538
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
539
 
540
- // Refresh scrollbar draw
541
- hidden.scrollTop(crayon[uid].top + 1);
542
- hidden.scrollTop(crayon[uid].top);
543
- hidden.scrollLeft(crayon[uid].left + 1);
544
- hidden.scrollLeft(crayon[uid].left);
545
- });
546
-
547
- // Restore scroll positions to hidden
548
- hidden.scrollTop(crayon[uid].top);
549
- hidden.scrollLeft(crayon[uid].left);
550
-
551
- update_plain_button(uid);
552
-
553
- // Hide toolbar if possible
554
- toolbar_toggle(uid, false);
555
- return false;
556
- };
557
-
558
- this.toggle_nums = function(uid, hide, instant) {
559
- if (typeof crayon[uid] == 'undefined') {
560
- make_uid(uid);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
561
  return false;
562
- }
563
 
564
- if (crayon[uid].table.is(':animated')) {
565
- return false;
566
- }
567
- var nums_width = Math.round(crayon[uid].nums_content.width() + 1);
568
- var neg_width = '-' + nums_width + 'px';
 
569
 
570
- // Force hiding
571
- var num_hidden;
572
- if (typeof hide != 'undefined') {
573
- num_hidden = false;
574
- } else {
575
- // Check hiding
576
- num_hidden = (crayon[uid].table.css('margin-left') == neg_width);
577
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
578
 
579
- var num_margin;
580
- if (num_hidden) {
581
- // Show
582
- num_margin = '0px';
583
- crayon[uid].nums_visible = true;
584
- } else {
585
- // Hide
586
- crayon[uid].table.css('margin-left', '0px');
587
- crayon[uid].nums_visible = false;
588
- num_margin = neg_width;
589
- }
590
-
591
- if (typeof instant != 'undefined') {
592
- crayon[uid].table.css('margin-left', num_margin);
593
- update_nums_button(uid);
594
- return false;
595
- }
596
-
597
- // Stop jerking animation from scrollbar appearing for a split second due to
598
- // change in width. Prevents scrollbar disappearing if already visible.
599
- h_scroll_visible = (crayon[uid].table.width() + px_to_int(crayon[uid].table.css('margin-left')) > crayon[uid].main.width());
600
- v_scroll_visible = (crayon[uid].table.height() > crayon[uid].main.height());
601
- if (!h_scroll_visible && !v_scroll_visible) {
602
- crayon[uid].main.css('overflow', 'hidden');
603
- }
604
- crayon[uid].table.animate({
605
- marginLeft: num_margin
606
- }, animt(200, uid), function() {
607
- if (typeof crayon[uid] != 'undefined') {
608
- update_nums_button(uid);
609
- if (!h_scroll_visible && !v_scroll_visible) {
610
- crayon[uid].main.css('overflow', 'auto');
611
- }
612
- }
613
- });
614
- return false;
615
- };
616
-
617
- var fix_table_width = function(uid) {
618
- if (typeof crayon[uid] == 'undefined') {
619
- make_uid(uid);
620
- return false;
621
- }
622
- };
623
-
624
- // Convert '-10px' to -10
625
- var px_to_int = function(pixels) {
626
- if (typeof pixels != 'string') {
627
- return 0;
628
- }
629
- var result = pixels.replace(/[^-0-9]/g, '');
630
- if (result.length == 0) {
631
- return 0;
632
- } else {
633
- return parseInt(result);
634
- }
635
- };
636
-
637
- var update_nums_button = function(uid) {
638
- if (typeof crayon[uid] == 'undefined' || typeof crayon[uid].nums_visible == 'undefined') {
639
- return;
640
- }
641
- if (crayon[uid].nums_visible) {
642
- crayon[uid].nums_button.removeClass(UNPRESSED);
643
- crayon[uid].nums_button.addClass(PRESSED);
644
- } else {
645
- // TODO doesn't work on iPhone
646
- crayon[uid].nums_button.removeClass(PRESSED);
647
- crayon[uid].nums_button.addClass(UNPRESSED);
648
- }
649
- };
650
-
651
- var update_plain_button = function(uid) {
652
- if (typeof crayon[uid] == 'undefined' || typeof crayon[uid].plain_visible == 'undefined') {
653
- return;
654
- }
655
 
656
- if (crayon[uid].plain_visible) {
657
- crayon[uid].plain_button.removeClass(UNPRESSED);
658
- crayon[uid].plain_button.addClass(PRESSED);
659
- } else {
660
- // TODO doesn't work on iPhone
661
- crayon[uid].plain_button.removeClass(PRESSED);
662
- crayon[uid].plain_button.addClass(UNPRESSED);
663
- }
664
- };
665
-
666
- var toolbar_toggle = function(uid, show, anim_time, hide_delay) {
667
- if (typeof crayon[uid] == 'undefined') {
668
- return make_uid(uid);
669
- } else if (!crayon[uid].toolbar_mouseover) {
670
- return;
671
- }
672
- var toolbar = crayon[uid].toolbar;
673
-
674
- if (typeof hide_delay == 'undefined') {
675
- hide_delay = crayon[uid].toolbar_delay;
676
- }
677
-
678
- crayon_slide(uid, toolbar, show, anim_time, hide_delay);
679
- // reconsile_dimensions(uid);
680
- };
681
-
682
- var toggle_scroll = function(uid, show) {
683
- if (typeof crayon[uid] == 'undefined') {
684
- return make_uid(uid);
685
- }
686
- if (typeof show == 'undefined') {
687
- return;
688
- }
689
-
690
- var main = crayon[uid].main;
691
- var plain = crayon[uid].plain;
692
-
693
- var main_size = {width:main.width(), height:main.height()};
694
-
695
- if (show) {
696
- main.css('overflow', 'auto');
697
- plain.css('overflow', 'auto');
698
- if (typeof crayon[uid].top != 'undefined') {
699
- visible = (main.css('z-index') == 1 ? main : plain);
700
- // Browser will not render until scrollbar moves, move it manually
701
- visible.scrollTop(crayon[uid].top-1);
702
- visible.scrollTop(crayon[uid].top);
703
- visible.scrollLeft(crayon[uid].left-1);
704
- visible.scrollLeft(crayon[uid].left);
705
- }
706
- if (!crayon[uid].scroll_block_fix) {
707
- // Fix dimensions so scrollbars stay inside
708
- main.css('height', main_size.height);
709
- main.css('width', main_size.width);
710
- } else {
711
- // Relax dimensions so scrollbars are visible
712
- main.css('height', '');
713
- main.css('max-height', '');
714
- main.css('min-height', '');
715
- main.css('width', '');
716
- }
717
- } else {
718
- visible = (main.css('z-index') == 1 ? main : plain);
719
- crayon[uid].top = visible.scrollTop();
720
- crayon[uid].left = visible.scrollLeft();
721
- main.css('overflow', 'hidden');
722
- plain.css('overflow', 'hidden');
723
- if (!crayon[uid].scroll_block_fix) {
724
- // Restore dimensions
725
- main.css('height', crayon[uid].main_style['height']);
726
- main.css('max-height', crayon[uid].main_style['max-height']);
727
- main.css('min-height', crayon[uid].main_style['min-height']);
728
- main.css('width', crayon[uid].main_style['width']);
729
- }
730
- }
731
- // Register that overflow has changed
732
- crayon[uid].scroll_changed = true;
733
- fix_scroll_blank(uid);
734
- reconsile_dimensions(uid);
735
- };
736
-
737
- /* Fix weird draw error, causes blank area to appear where scrollbar once was. */
738
- var fix_scroll_blank = function(uid) {
739
- // Scrollbar draw error in Chrome
740
- crayon[uid].table.style('width', '100%', 'important');
741
- var redraw = setTimeout(function() {
742
- crayon[uid].table.style('width', '');
743
- clearInterval(redraw);
744
- }, 10);
745
- };
746
-
747
- var reconsile_dimensions = function(uid) {
748
- // Reconsile dimensions
749
- crayon[uid].plain.height(crayon[uid].main.height());
750
- //crayon[uid].plain.width(crayon[uid].main.width());
 
 
 
 
 
 
 
 
 
 
 
751
 
752
- // console_log('main: ' + crayon[uid].main.height() + ' plain: ' + crayon[uid].plain.height());
753
- };
754
-
755
- var animt = function(x, uid) {
756
- if (x == 'fast') {
757
- x = 200;
758
- } else if (x == 'slow') {
759
- x = 600;
760
- } else if (!isNumber(x)) {
761
- x = parseInt(x);
762
- if (isNaN(x)) {
763
- return 0;
764
- }
765
- }
766
- return x * crayon[uid].time;
767
- };
768
-
769
- var isNumber = function(x) {
770
- return typeof x == 'number';
771
  };
772
-
773
- };
774
 
 
1
  // Crayon Syntax Highlighter JavaScript
2
 
3
+ (function($) {
4
 
5
+ // BEGIN AUXILIARY FUNCTIONS
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
 
7
+ $.fn.exists = function () {
8
+ return this.length !== 0;
 
 
 
 
 
 
9
  };
10
+
11
+ // This makes IE < 9 doesn't support CSSStyleDeclaration, can't use this
12
+ CrayonSyntaxUnused = function () {
13
+ // For those who need them (< IE 9), add support for CSS functions
14
+ var isStyleFuncSupported = null;
15
+ if (typeof(CSSStyleDeclaration) != 'undefined') {
16
+ isStyleFuncSupported = CSSStyleDeclaration.prototype.getPropertyValue != null;
17
+ if (!isStyleFuncSupported) {
18
+ CSSStyleDeclaration.prototype.getPropertyValue = function(a) {
19
+ return this.getAttribute(a);
20
+ };
21
+ CSSStyleDeclaration.prototype.setProperty = function(styleName, value, priority) {
22
+ this.setAttribute(styleName,value);
23
+ var priority = typeof priority != 'undefined' ? priority : '';
24
+ if (priority != '') {
25
+ // Add priority manually
26
+ var rule = new RegExp(RegExp.escape(styleName) + '\\s*:\\s*' + RegExp.escape(value) + '(\\s*;)?', 'gmi');
27
+ this.cssText = this.cssText.replace(rule, styleName + ': ' + value + ' !' + priority + ';');
28
+ }
29
+ };
30
+ CSSStyleDeclaration.prototype.removeProperty = function(a) {
31
+ return this.removeAttribute(a);
32
+ };
33
+ CSSStyleDeclaration.prototype.getPropertyPriority = function(styleName) {
34
+ var rule = new RegExp(RegExp.escape(styleName) + '\\s*:\\s*[^\\s]*\\s*!important(\\s*;)?', 'gmi');
35
+ return rule.test(this.cssText) ? 'important' : '';
36
+ };
37
+ }
38
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  };
40
 
41
+ // Escape regex chars with \
42
+ RegExp.escape = function(text) {
43
+ return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
44
+ };
45
+
46
+
47
+ var hasCSSStyleDeclaration = typeof(CSSStyleDeclaration) != 'undefined';
48
+ $.fn.style = function(styleName, value, priority) {
49
+ // DOM node
50
+ var node = this.get(0);
51
+ // Ensure we have a DOM node
52
+ if (typeof node == 'undefined') {
53
+ return;
54
+ }
55
+ // CSSStyleDeclaration
56
+ var style = node.style;
57
+ // Getter/Setter
58
+ if (typeof styleName != 'undefined') {
59
+ if (typeof value != 'undefined') {
60
+ // Set style property
61
+ var priority = typeof priority != 'undefined' ? priority : '';
62
+ if (typeof style.setProperty != 'undefined') {
63
+ style.setProperty(styleName, value, priority);
64
+ } else {
65
+ style.styleName = value + ' ' + priority;
66
+ }
67
+ } else {
68
+ // Get style property
69
+ if (hasCSSStyleDeclaration) {
70
+ return style.getPropertyValue(styleName);
71
+ } else {
72
+ return style.styleName;
73
+ }
74
+ }
75
+ } else {
76
+ // Get CSSStyleDeclaration
77
+ return style;
78
+ }
79
  };
80
 
81
+ // END AUXILIARY FUNCTIONS
 
 
82
 
83
+ var PRESSED = 'crayon-pressed';
84
+ var UNPRESSED = '';
 
 
 
 
 
 
 
 
 
 
85
 
86
+ var CRAYON_SYNTAX = 'div.crayon-syntax';
87
+ var CRAYON_TOOLBAR = '.crayon-toolbar';
88
+ var CRAYON_INFO = '.crayon-info';
89
+ var CRAYON_PLAIN = '.crayon-plain';
90
+ var CRAYON_MAIN = '.crayon-main';
91
+ var CRAYON_TABLE = '.crayon-table';
92
+ var CRAYON_CODE = '.crayon-code';
93
+ var CRAYON_NUMS = '.crayon-nums';
94
+ var CRAYON_NUMS_CONTENT = '.crayon-nums-content';
95
+ var CRAYON_NUMS_BUTTON = '.crayon-nums-button';
96
+ var CRAYON_POPUP_BUTTON = '.crayon-popup-button';
97
+ var CRAYON_COPY_BUTTON = '.crayon-copy-button';
98
+ var CRAYON_PLAIN_BUTTON = '.crayon-plain-button';
99
 
100
+ $(document).ready(function() {
101
+ CrayonSyntax.init();
102
+ });
103
 
104
+ CrayonSyntax = new function() {
105
+ var crayon = new Object();
106
+ var currUID = 0;
107
+
108
+ this.init = function() {
109
+ if (typeof crayon == 'undefined') {
110
+ crayon = new Object();
111
+ }
112
+
113
+ $(CRAYON_SYNTAX).each(function() {
114
+ CrayonSyntax.process(this);
115
+ });
116
+ };
117
+
118
+ this.process = function(c, replace) {
119
+ c = $(c);
120
+ var uid = c.attr('id');
121
+ if (uid == 'crayon-') {
122
+ // No ID, generate one
123
+ uid += getUID();
124
+ }
125
+ c.attr('id', uid);
126
+ console_log(uid);
127
+
128
+ if (typeof replace == 'undefined') {
129
+ replace = false;
130
+ }
131
+
132
+ if (!replace && !make_uid(uid)) {
133
+ // Already a Crayon
134
+ return;
135
+ }
136
+
137
+ var toolbar = c.find(CRAYON_TOOLBAR);
138
+ var info = c.find(CRAYON_INFO);
139
+ var plain = c.find(CRAYON_PLAIN);
140
+ var main = c.find(CRAYON_MAIN);
141
+ var table = c.find(CRAYON_TABLE);
142
+ var code = c.find(CRAYON_CODE);
143
+ var nums = c.find(CRAYON_NUMS);
144
+ var nums_content = c.find(CRAYON_NUMS_CONTENT);
145
+ var nums_button = c.find(CRAYON_NUMS_BUTTON);
146
+ var popup_button = c.find(CRAYON_POPUP_BUTTON);
147
+ var copy_button = c.find(CRAYON_COPY_BUTTON);
148
+ var plain_button = c.find(CRAYON_PLAIN_BUTTON);
149
+
150
+ crayon[uid] = c;
151
+ crayon[uid].toolbar = toolbar;
152
+ crayon[uid].plain = plain;
153
+ crayon[uid].info = info;
154
+ crayon[uid].main = main;
155
+ crayon[uid].table = table;
156
+ crayon[uid].code = code;
157
+ crayon[uid].nums = nums;
158
+ crayon[uid].nums_content = nums_content;
159
+ crayon[uid].nums_button = nums_button;
160
+ crayon[uid].popup_button = popup_button;
161
+ crayon[uid].copy_button = copy_button;
162
+ crayon[uid].plain_button = plain_button;
163
+ crayon[uid].nums_visible = true;
164
+ crayon[uid].plain_visible = false;
165
+
166
+ crayon[uid].toolbar_delay = 0;
167
+ crayon[uid].time = 1;
168
+
169
+ // Set plain
170
+ $(CRAYON_PLAIN).css('z-index', 0);
171
+
172
+ // XXX Remember CSS dimensions
173
+ var main_style = main.style();
174
+ crayon[uid].main_style = {
175
+ height: main_style && main_style.height || '',
176
+ max_height: main_style && main_style.maxHeight || '',
177
+ min_height: main_style && main_style.minHeight || '',
178
+ width: main_style && main_style.width || ''
179
+ };
180
+
181
+ var load_timer;
182
+ var i = 0;
183
+ crayon[uid].loading = true;
184
+ crayon[uid].scroll_block_fix = false;
185
+
186
+ // Register click events
187
+ nums_button.click(function() { CrayonSyntax.toggle_nums(uid); });
188
+ plain_button.click(function() { CrayonSyntax.toggle_plain(uid); });
189
+ copy_button.click(function() { CrayonSyntax.copy_plain(uid); });
190
+
191
+ var load_func = function() {
192
+ if (main.height() < 30) {
193
+ crayon[uid].scroll_block_fix = true;
194
+ }
195
+
196
+ // reconsile_dimensions(uid);
197
+
198
+ // If nums hidden by default
199
+ if (nums.filter('[data-settings~="hide"]').length != 0) {
200
+ nums_content.ready(function() {
201
+ console_log('function' + uid);
202
+ CrayonSyntax.toggle_nums(uid, true, true);
203
+ });
204
+ } else {
205
+ update_nums_button(uid);
206
+ }
207
+
208
+ // TODO If width has changed or timeout, stop timer
209
+ if (/*last_num_width != nums.width() ||*/ i == 5) {
210
+ clearInterval(load_timer);
211
+ crayon[uid].loading = false;
212
+ }
213
+ i++;
214
+ };
215
+ // main.ready(function() {
216
+ // alert();
217
+ load_timer = setInterval(load_func, 300);
218
+ fix_scroll_blank(uid);
219
+ // });
220
+
221
+ // Used for toggling
222
+ main.css('position', 'relative');
223
+ main.css('z-index', 1);
224
+
225
+ // Update clickable buttons
226
+ update_nums_button(uid);
227
+ update_plain_button(uid);
228
+
229
+ // Disable certain features for touchscreen devices
230
+ touchscreen = (c.filter('[data-settings~="touchscreen"]').length != 0);
231
+
232
+ // Used to hide info
233
+ if (!touchscreen) {
234
+ main.click(function() { crayon_info(uid, '', false); });
235
+ plain.click(function() { crayon_info(uid, '', false); });
236
+ info.click(function() { crayon_info(uid, '', false); });
237
+ }
238
+
239
+ // Used for code popup
240
+ crayon[uid].popup_settings = popupWindow(popup_button, {
241
+ height:screen.height - 200,
242
+ width:screen.width - 100,
243
+ top:75,
244
+ left:50,
245
+ scrollbars:1,
246
+ windowURL:'',
247
+ data:'' // Data overrides URL
248
+ }, function() {
249
+ code_popup(uid);
250
+ }, function() {
251
+ //console_log('after');
252
+ });
253
 
254
+ plain.css('opacity', 0);
255
+ // If a toolbar with mouseover was found
256
+ if (toolbar.filter('[data-settings~="mouseover"]').length != 0 && !touchscreen) {
257
+ crayon[uid].toolbar_mouseover = true;
258
+
259
+ toolbar.css('margin-top', '-' + toolbar.height() + 'px');
260
+ toolbar.hide();
261
+ // Overlay the toolbar if needed, only if doing so will not hide the
262
+ // whole code!
263
+ if (toolbar.filter('[data-settings~="overlay"]').length != 0
264
+ && main.height() > toolbar.height() * 2) {
265
+ toolbar.css('position', 'absolute');
266
+ toolbar.css('z-index', 2);
267
+ // Hide on single click when overlayed
268
+ if (toolbar.filter('[data-settings~="hide"]').length != 0) {
269
+ main.click(function() { toolbar_toggle(uid, undefined, undefined, 0); });
270
+ plain.click(function() { toolbar_toggle(uid, false, undefined, 0); });
271
+ }
272
+ } else {
273
+ toolbar.css('z-index', 4);
274
+ }
275
+ // Enable delay on mouseout
276
+ if (toolbar.filter('[data-settings~="delay"]').length != 0) {
277
+ crayon[uid].toolbar_delay = 500;
278
+ }
279
+ // Use .hover() for chrome, but in firefox mouseover/mouseout worked best
280
+ c.mouseenter(function() { toolbar_toggle(uid, true); })
281
+ .mouseleave(function() { toolbar_toggle(uid, false); });
282
+
283
+ } else if (touchscreen) {
284
+ toolbar.show();
285
+ }
286
+ // Plain show events
287
+ if (plain.length != 0 && !touchscreen) {
288
+ if (plain.filter('[data-settings~="dblclick"]').length != 0) {
289
+ main.dblclick(function() { CrayonSyntax.toggle_plain(uid); });
290
+ } else if (plain.filter('[data-settings~="click"]').length != 0) {
291
+ main.click(function() { CrayonSyntax.toggle_plain(uid); });
292
+ } else if (plain.filter('[data-settings~="mouseover"]').length != 0) {
293
+ c.mouseenter(function() { CrayonSyntax.toggle_plain(uid, true); })
294
+ .mouseleave(function() { CrayonSyntax.toggle_plain(uid, false); });
295
+ nums_button.hide();
296
+ }
297
+ if (plain.filter('[data-settings~="show-plain-default"]').length != 0) {
298
+ // XXX
299
+ CrayonSyntax.toggle_plain(uid, true);
300
+ }
301
+ }
302
+ // Scrollbar show events
303
+ if (!touchscreen && c.filter('[data-settings~="scroll-mouseover"]').length != 0) {
304
+ // Disable on touchscreen devices and when set to mouseover
305
+ main.css('overflow', 'hidden');
306
+ plain.css('overflow', 'hidden');
307
+
308
+ console_log(plain.css('overflow'));
309
+
310
+ c.mouseenter(function() { toggle_scroll(uid, true); })
311
+ .mouseleave(function() { toggle_scroll(uid, false); });
312
+ }
313
+ // Disable animations
314
+ if ( c.filter('[data-settings~="disable-anim"]').length != 0 ) {
315
+ crayon[uid].time = 0;
316
+ }
317
+
318
+ // Determine if Mac
319
+ crayon[uid].mac = c.hasClass('crayon-os-mac');
320
+ };
321
 
322
+ var make_uid = function(uid) {
323
+ console_log(crayon);
324
+ if (typeof crayon[uid] == 'undefined') {
325
+ crayon[uid] = $('#'+uid);
326
+ console_log('make ' + uid);
327
+ return true;
328
+ }
329
+
330
+ console_log('no make ' + uid);
331
+ return false;
332
+ };
333
 
334
+ var getUID = function() {
335
+ return currUID++;
336
+ };
337
 
338
+ var code_popup = function(uid) {
339
+ if (typeof crayon[uid] == 'undefined') {
340
+ return make_uid(uid);
341
+ }
342
+ var code = crayon[uid].plain_visible ? crayon[uid].plain : crayon[uid].main;
343
+ var settings = crayon[uid].popup_settings;
344
+ settings.data = get_all_css() + '<body style="padding:0; margin:0;"><div class="' + crayon[uid].attr('class') +
345
+ ' crayon-popup">' + remove_css_inline(get_jquery_str(code)) + '</div></body>';
346
+ if (typeof settings == 'undefined') {
347
+ return;
348
+ }
349
+ };
350
 
351
+ var get_jquery_str = function(object) {
352
+ return $('<div>').append(object.clone()).remove().html();
353
+ };
354
 
355
+ var remove_css_inline = function(string) {
356
+ return string.replace(/style\s*=\s*["'][^"]+["']/gmi, '');
357
+ };
 
 
 
358
 
359
+ // Get all CSS on the page as a string
360
+ var get_all_css = function() {
361
+ var css_str = '';
362
+ css = $('link[rel="stylesheet"]').each(function() {
363
+ var string = get_jquery_str($(this));
364
+ css_str += string;
365
+ });
366
+ return css_str;
367
+ };
368
 
369
+ this.copy_plain = function(uid, hover) {
370
+ if (typeof crayon[uid] == 'undefined') {
371
+ return make_uid(uid);
372
+ }
373
+
374
+ var plain = crayon[uid].plain;
375
+
376
+ this.toggle_plain(uid, true, true);
377
+ toolbar_toggle(uid, true);
378
+
379
+ key = crayon[uid].mac ? '\u2318' : 'CTRL';
380
+ var text = crayon[uid].copy_button.attr('data-text');
381
+ text = text.replace(/%s/, key + '+C');
382
+ text = text.replace(/%s/, key + '+V');
383
+ crayon_info(uid, text);
384
+ return false;
385
+ };
386
 
387
+ var crayon_info = function(uid, text, show) {
388
+ if (typeof crayon[uid] == 'undefined') {
389
+ return make_uid(uid);
390
+ }
391
+
392
+ var info = crayon[uid].info;
393
+
394
+ if (typeof text == 'undefined') {
395
+ text = '';
396
+ }
397
+ if (typeof show == 'undefined') {
398
+ show = true;
399
+ }
400
+
401
+ if (crayon_is_slide_hidden(info) && show) {
402
+ info.html('<div>' + text + '</div>');
403
+ info.css('margin-top', -info.height());
404
+ info.show();
405
+ crayon_slide(uid, info, true);
406
+ setTimeout(function() {
407
+ crayon_slide(uid, info, false);
408
+ }, 5000);
409
+ }
410
+
411
+ if (!show) {
412
+ crayon_slide(uid, info, false);
413
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
414
 
415
+ };
 
 
 
416
 
417
+ var crayon_is_slide_hidden = function(object) {
418
+ var object_neg_height = '-' + object.height() + 'px';
419
+ if (object.css('margin-top') == object_neg_height || object.css('display') == 'none') {
420
+ return true;
421
+ } else {
422
+ return false;
423
+ }
424
+ };
425
 
426
+ var crayon_slide = function(uid, object, show, anim_time, hide_delay) {
427
+ var object_neg_height = '-' + object.height() + 'px';
428
+
429
+ if (typeof show == 'undefined') {
430
+ if (crayon_is_slide_hidden(object)) {
431
+ show = true;
432
+ } else {
433
+ show = false;
434
+ }
435
+ }
436
+ // Instant means no time delay for showing/hiding
437
+ if (typeof anim_time == 'undefined') {
438
+ anim_time = 100;
439
+ }
440
+ if (anim_time == false) {
441
+ anim_time = false;
442
+ }
443
+ if (typeof hide_delay== 'undefined') {
444
+ hide_delay = 0;
445
+ }
446
+ object.stop(true);
447
+ if (show == true) {
448
+ object.show();
449
+ object.animate({
450
+ marginTop: 0
451
+ }, animt(anim_time, uid));
452
+ } else if (show == false) {
453
+ // Delay if fully visible
454
+ if (/*instant == false && */object.css('margin-top') == '0px' && hide_delay) {
455
+ object.delay(hide_delay);
456
+ }
457
+ object.animate({
458
+ marginTop: object_neg_height
459
+ }, animt(anim_time, uid), function() {
460
+ object.hide();
461
+ });
462
+ }
463
+ };
464
 
465
+ this.toggle_plain = function(uid, hover, select) {
466
+ if (typeof crayon[uid] == 'undefined') {
467
+ return make_uid(uid);
468
+ }
469
+
470
+ var main = crayon[uid].main;
471
+ var plain = crayon[uid].plain;
472
+
473
+ if ( (main.is(':animated') || plain.is(':animated')) && typeof hover == 'undefined' ) {
474
+ return;
475
+ }
476
+
477
+ reconsile_dimensions(uid);
478
+
479
+ var visible, hidden;
480
+ if (typeof hover != 'undefined') {
481
+ if (hover) {
482
+ visible = main;
483
+ hidden = plain;
484
+ } else {
485
+ visible = plain;
486
+ hidden = main;
487
+ }
488
+ } else {
489
+ if (main.css('z-index') == 1) {
490
+ visible = main;
491
+ hidden = plain;
492
+ } else {
493
+ visible = plain;
494
+ hidden = main;
495
+ }
496
+ }
497
+
498
+ crayon[uid].plain_visible = (hidden == plain);
499
+
500
+ // Remember scroll positions of visible
501
+ crayon[uid].top = visible.scrollTop();
502
+ crayon[uid].left = visible.scrollLeft();
503
+
504
+ /* Used to detect a change in overflow when the mouse moves out
505
+ * of the Crayon. If it does, then overflow has already been changed,
506
+ * no need to revert it after toggling plain. */
507
+ crayon[uid].scroll_changed = false;
508
+
509
+ // Hide scrollbars during toggle to avoid Chrome weird draw error
510
+ // visible.css('overflow', 'hidden');
511
+ // hidden.css('overflow', 'hidden');
512
+
513
+ fix_scroll_blank(uid);
514
+
515
+ // Show hidden, hide visible
516
+ visible.stop(true);
517
+ visible.fadeTo(animt(500, uid), 0,
518
+ function() {
519
+ visible.css('z-index', 0);
520
+ // if (!crayon[uid].scroll_changed) {
521
+ // visible.css('overflow', vis_over);
522
+ // }
523
+ });
524
+ hidden.stop(true);
525
+ hidden.fadeTo(animt(500, uid), 1,
526
+ function() {
527
+ hidden.css('z-index', 1);
528
+ // if (!crayon[uid].scroll_changed) {
529
+ // hidden.css('overflow', hid_over);
530
+ // }
531
+
532
+ // Give focus to plain code
533
+ if (hidden == plain) {
534
+ if (select) {
535
+ plain.select();
536
+ } else {
537
+ // XXX not needed
538
+ // plain.focus();
539
+ }
540
  }
541
+
542
+ // Refresh scrollbar draw
543
+ hidden.scrollTop(crayon[uid].top + 1);
544
+ hidden.scrollTop(crayon[uid].top);
545
+ hidden.scrollLeft(crayon[uid].left + 1);
546
+ hidden.scrollLeft(crayon[uid].left);
547
+ });
548
+
549
+ // Restore scroll positions to hidden
550
+ hidden.scrollTop(crayon[uid].top);
551
+ hidden.scrollLeft(crayon[uid].left);
552
+
553
+ update_plain_button(uid);
554
+
555
+ // Hide toolbar if possible
556
+ toolbar_toggle(uid, false);
557
+ return false;
558
+ };
559
+
560
+ this.toggle_nums = function(uid, hide, instant) {
561
+ if (typeof crayon[uid] == 'undefined') {
562
+ make_uid(uid);
563
+ return false;
564
+ }
565
+
566
+ if (crayon[uid].table.is(':animated')) {
567
+ return false;
568
+ }
569
+ var nums_width = Math.round(crayon[uid].nums_content.width() + 1);
570
+ var neg_width = '-' + nums_width + 'px';
571
+
572
+ // Force hiding
573
+ var num_hidden;
574
+ if (typeof hide != 'undefined') {
575
+ num_hidden = false;
576
+ } else {
577
+ // Check hiding
578
+ num_hidden = (crayon[uid].table.css('margin-left') == neg_width);
579
+ }
580
 
581
+ var num_margin;
582
+ if (num_hidden) {
583
+ // Show
584
+ num_margin = '0px';
585
+ crayon[uid].nums_visible = true;
586
+ } else {
587
+ // Hide
588
+ crayon[uid].table.css('margin-left', '0px');
589
+ crayon[uid].nums_visible = false;
590
+ num_margin = neg_width;
591
+ }
592
+
593
+ if (typeof instant != 'undefined') {
594
+ crayon[uid].table.css('margin-left', num_margin);
595
+ update_nums_button(uid);
596
+ return false;
597
+ }
598
+
599
+ // Stop jerking animation from scrollbar appearing for a split second due to
600
+ // change in width. Prevents scrollbar disappearing if already visible.
601
+ h_scroll_visible = (crayon[uid].table.width() + px_to_int(crayon[uid].table.css('margin-left')) > crayon[uid].main.width());
602
+ v_scroll_visible = (crayon[uid].table.height() > crayon[uid].main.height());
603
+ if (!h_scroll_visible && !v_scroll_visible) {
604
+ crayon[uid].main.css('overflow', 'hidden');
605
+ }
606
+ crayon[uid].table.animate({
607
+ marginLeft: num_margin
608
+ }, animt(200, uid), function() {
609
+ if (typeof crayon[uid] != 'undefined') {
610
+ update_nums_button(uid);
611
+ if (!h_scroll_visible && !v_scroll_visible) {
612
+ crayon[uid].main.css('overflow', 'auto');
613
+ }
614
+ }
615
+ });
616
  return false;
617
+ };
618
 
619
+ var fix_table_width = function(uid) {
620
+ if (typeof crayon[uid] == 'undefined') {
621
+ make_uid(uid);
622
+ return false;
623
+ }
624
+ };
625
 
626
+ // Convert '-10px' to -10
627
+ var px_to_int = function(pixels) {
628
+ if (typeof pixels != 'string') {
629
+ return 0;
630
+ }
631
+ var result = pixels.replace(/[^-0-9]/g, '');
632
+ if (result.length == 0) {
633
+ return 0;
634
+ } else {
635
+ return parseInt(result);
636
+ }
637
+ };
638
+
639
+ var update_nums_button = function(uid) {
640
+ if (typeof crayon[uid] == 'undefined' || typeof crayon[uid].nums_visible == 'undefined') {
641
+ return;
642
+ }
643
+ if (crayon[uid].nums_visible) {
644
+ crayon[uid].nums_button.removeClass(UNPRESSED);
645
+ crayon[uid].nums_button.addClass(PRESSED);
646
+ } else {
647
+ // TODO doesn't work on iPhone
648
+ crayon[uid].nums_button.removeClass(PRESSED);
649
+ crayon[uid].nums_button.addClass(UNPRESSED);
650
+ }
651
+ };
652
+
653
+ var update_plain_button = function(uid) {
654
+ if (typeof crayon[uid] == 'undefined' || typeof crayon[uid].plain_visible == 'undefined') {
655
+ return;
656
+ }
657
 
658
+ if (crayon[uid].plain_visible) {
659
+ crayon[uid].plain_button.removeClass(UNPRESSED);
660
+ crayon[uid].plain_button.addClass(PRESSED);
661
+ } else {
662
+ // TODO doesn't work on iPhone
663
+ crayon[uid].plain_button.removeClass(PRESSED);
664
+ crayon[uid].plain_button.addClass(UNPRESSED);
665
+ }
666
+ };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
667
 
668
+ var toolbar_toggle = function(uid, show, anim_time, hide_delay) {
669
+ if (typeof crayon[uid] == 'undefined') {
670
+ return make_uid(uid);
671
+ } else if (!crayon[uid].toolbar_mouseover) {
672
+ return;
673
+ }
674
+ var toolbar = crayon[uid].toolbar;
675
+
676
+ if (typeof hide_delay == 'undefined') {
677
+ hide_delay = crayon[uid].toolbar_delay;
678
+ }
679
+
680
+ crayon_slide(uid, toolbar, show, anim_time, hide_delay);
681
+ // reconsile_dimensions(uid);
682
+ };
683
+
684
+ var toggle_scroll = function(uid, show) {
685
+ if (typeof crayon[uid] == 'undefined') {
686
+ return make_uid(uid);
687
+ }
688
+ if (typeof show == 'undefined') {
689
+ return;
690
+ }
691
+
692
+ var main = crayon[uid].main;
693
+ var plain = crayon[uid].plain;
694
+
695
+ var main_size = {width:main.width(), height:main.height()};
696
+
697
+ if (show) {
698
+ main.css('overflow', 'auto');
699
+ plain.css('overflow', 'auto');
700
+ if (typeof crayon[uid].top != 'undefined') {
701
+ visible = (main.css('z-index') == 1 ? main : plain);
702
+ // Browser will not render until scrollbar moves, move it manually
703
+ visible.scrollTop(crayon[uid].top-1);
704
+ visible.scrollTop(crayon[uid].top);
705
+ visible.scrollLeft(crayon[uid].left-1);
706
+ visible.scrollLeft(crayon[uid].left);
707
+ }
708
+ if (!crayon[uid].scroll_block_fix) {
709
+ // Fix dimensions so scrollbars stay inside
710
+ main.css('height', main_size.height);
711
+ main.css('width', main_size.width);
712
+ } else {
713
+ // Relax dimensions so scrollbars are visible
714
+ main.css('height', '');
715
+ main.css('max-height', '');
716
+ main.css('min-height', '');
717
+ main.css('width', '');
718
+ }
719
+ } else {
720
+ visible = (main.css('z-index') == 1 ? main : plain);
721
+ crayon[uid].top = visible.scrollTop();
722
+ crayon[uid].left = visible.scrollLeft();
723
+ main.css('overflow', 'hidden');
724
+ plain.css('overflow', 'hidden');
725
+ if (!crayon[uid].scroll_block_fix) {
726
+ // Restore dimensions
727
+ main.css('height', crayon[uid].main_style['height']);
728
+ main.css('max-height', crayon[uid].main_style['max-height']);
729
+ main.css('min-height', crayon[uid].main_style['min-height']);
730
+ main.css('width', crayon[uid].main_style['width']);
731
+ }
732
+ }
733
+ // Register that overflow has changed
734
+ crayon[uid].scroll_changed = true;
735
+ fix_scroll_blank(uid);
736
+ reconsile_dimensions(uid);
737
+ };
738
+
739
+ /* Fix weird draw error, causes blank area to appear where scrollbar once was. */
740
+ var fix_scroll_blank = function(uid) {
741
+ // Scrollbar draw error in Chrome
742
+ crayon[uid].table.style('width', '100%', 'important');
743
+ var redraw = setTimeout(function() {
744
+ crayon[uid].table.style('width', '');
745
+ clearInterval(redraw);
746
+ }, 10);
747
+ };
748
+
749
+ var reconsile_dimensions = function(uid) {
750
+ // Reconsile dimensions
751
+ crayon[uid].plain.height(crayon[uid].main.height());
752
+ //crayon[uid].plain.width(crayon[uid].main.width());
753
+
754
+ // console_log('main: ' + crayon[uid].main.height() + ' plain: ' + crayon[uid].plain.height());
755
+ };
756
+
757
+ var animt = function(x, uid) {
758
+ if (x == 'fast') {
759
+ x = 200;
760
+ } else if (x == 'slow') {
761
+ x = 600;
762
+ } else if (!isNumber(x)) {
763
+ x = parseInt(x);
764
+ if (isNaN(x)) {
765
+ return 0;
766
+ }
767
+ }
768
+ return x * crayon[uid].time;
769
+ };
770
+
771
+ var isNumber = function(x) {
772
+ return typeof x == 'number';
773
+ };
774
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
775
  };
 
 
776
 
777
+ })(jQueryCrayon);
js/crayon_admin.js CHANGED
@@ -1,352 +1,379 @@
1
  // Crayon Syntax Highlighter Admin JavaScript
2
 
3
- var CrayonSyntaxAdmin = new function() {
4
-
5
- // Preview
6
- var preview = preview_info = preview_cbox = preview_url = preview_delay_timer = preview_get = null;
7
- // The DOM object ids that trigger a preview update
8
- var preview_obj_names = [];
9
- // The jQuery objects for these objects
10
- var preview_objs = [];
11
- var preview_last_values = [];
12
- // Alignment
13
- var align_drop = float = null;
14
- // Toolbar
15
- var overlay = toolbar = null;
16
- // Error
17
- var msg_cbox = msg = null;
18
- // Log
19
- var log_button = log_text = null;
20
-
21
- var main_wrap = theme_editor_wrap = editor_url = theme_editor_edit_button = theme_editor_create_button = null;
22
- // var theme_editor_loaded = false;
23
- // var theme_editor_loading = false;
24
-
25
- var settings = CrayonSyntaxSettings;
26
- var me = this;
27
-
28
- this.cssElem = function(id) {
29
- return jQuery(this.addPrefixToID(id));
30
- };
31
-
32
- // Used in Tag Editor
33
- this.addPrefixToID = function(id) {
34
- return id.replace(/^([#.])?(.*)$/, '$1'+settings.prefix+'$2');
35
- };
36
-
37
- this.removePrefixFromID = function(id) {
38
- var re = new RegExp('^[#.]?'+settings.prefix, 'i');
39
- return id.replace(re,'');
40
- };
41
-
42
- this.init = function() {
43
- console_log('admin init');
44
-
45
- // Wraps
46
- main_wrap = jQuery('#crayon-main-wrap');
47
- theme_editor_wrap = jQuery('#crayon-theme-editor-wrap');
48
- editor_url = theme_editor_wrap.attr('url');
49
- theme_editor_edit_button = jQuery('#crayon-theme-editor-edit-button');
50
- theme_editor_create_button = jQuery('#crayon-theme-editor-create-button');
51
- theme_editor_edit_button.click(function() { CrayonSyntaxAdmin.show_theme_editor(theme_editor_edit_button, true); });
52
- theme_editor_create_button.click(function() { CrayonSyntaxAdmin.show_theme_editor(theme_editor_create_button, false); });
53
-
54
- // Theme editor
55
- var get_vars = this.get_vars();
56
- if (get_vars['subpage'] == 'theme_editor') {
57
- this.show_theme_editor();
58
- } else {
59
- this.show_main();
60
- }
61
-
62
- // Help
63
- help = jQuery('.crayon-help-close');
64
- help.click(function() {
65
- jQuery('.crayon-help').hide();
66
- jQuery.get(help.attr('url'));
67
- });
68
-
69
  // Preview
70
- preview = jQuery('#crayon-live-preview');
71
- preview_info = jQuery('#crayon-preview-info');
72
- preview_url = preview.attr('url');
73
- preview_cbox = me.cssElem('#preview');
74
- if (preview.length != 0) {
75
- // Preview not needed in Tag Editor
76
- preview_register();
77
- preview.ready(function() {
78
- preview_toggle();
79
- });
80
- preview_cbox.change(function() { preview_toggle(); });
81
- }
82
-
83
  // Alignment
84
- align_drop = me.cssElem('#h-align');
85
- float = jQuery('#crayon-subsection-float');
86
- align_drop.change(function() { float_toggle(); });
87
- align_drop.ready(function() { float_toggle(); });
88
-
89
- // Custom Error
90
- msg_cbox = me.cssElem('#error-msg-show');
91
- msg = me.cssElem('#error-msg');
92
- toggle_error();
93
- msg_cbox.change(function() { toggle_error(); });
94
-
95
- // Toolbar
96
- overlay = jQuery('#crayon-subsection-toolbar');
97
- toolbar = me.cssElem('#toolbar');
98
- toggle_toolbar();
99
- toolbar.change(function() { toggle_toolbar(); });
100
-
101
- // Copy
102
- plain = me.cssElem('#plain');
103
- copy = jQuery('#crayon-subsection-copy-check');
104
- plain.change(function() {
105
- if (plain.is(':checked')) {
106
- copy.show();
107
- } else {
108
- copy.hide();
109
- }
110
- });
111
-
112
- // Log
113
- log_wrapper = jQuery('#crayon-log-wrapper');
114
- log_button = jQuery('#crayon-log-toggle');
115
- log_text = jQuery('#crayon-log-text');
116
- var show_log = log_button.attr('show_txt');
117
- var hide_log = log_button.attr('hide_txt');
118
- clog = jQuery('#crayon-log');
119
- log_button.val(show_log);
120
- log_button.click(function() {
121
- clog.width(log_wrapper.width());
122
- clog.toggle();
123
- // Scrolls content
124
- clog.scrollTop(log_text.height());
125
- var text = ( log_button.val() == show_log ? hide_log : show_log );
126
- log_button.val(text);
127
- });
128
-
129
- };
130
-
131
- /* Whenever a control changes preview */
132
- var preview_update = function() {
133
- // console_log('preview_update');
134
- preview_get = '?';
135
- var val = 0;
136
- var obj;
137
- for (var i = 0; i < preview_obj_names.length; i++) {
138
- obj = preview_objs[i];
139
- if (obj.attr('type') == 'checkbox') {
140
- val = obj.is(':checked');
141
  } else {
142
- val = obj.val();
143
  }
144
- preview_get += preview_obj_names[i] + '=' + crayon_escape(val) + "&";
145
- }
146
-
147
- // XXX Scroll to top of themes
148
- // Disabled for now, too annoying
149
- //var top = jQuery('a[name="crayon-theme"]');
150
- //jQuery(window).scrollTop(top.position().top);
151
-
152
- // Delay resize
153
- // preview.css('height', preview.height());
154
- // preview.css('overflow', 'hidden');
155
- // preview_timer = setInterval(function() {
156
- // preview.css('height', '');
157
- // preview.css('overflow', 'visible');
158
- // clearInterval(preview_timer);
159
- // }, 1000);
160
-
161
- // Load Preview
162
- jQuery.get(preview_url + preview_get, function(data) {
163
- preview.html(data);
164
- // Important! Calls the crayon.js init
165
- CrayonSyntax.init();
166
- });
167
- };
168
-
169
- var preview_toggle = function() {
170
- // console_log('preview_toggle');
171
- if ( preview_cbox.is(':checked') ) {
172
- preview.show();
173
- preview_info.show();
174
- preview_update();
175
- } else {
176
- preview.hide();
177
- preview_info.hide();
178
- }
179
- };
180
-
181
- var float_toggle = function() {
182
- if ( align_drop.val() != 0 ) {
183
- float.show();
184
- } else {
185
- float.hide();
186
- }
187
- };
188
-
189
- // List of callbacks
190
- var preview_callback;
191
- var preview_txt_change;
192
- var preview_txt_callback; // Only updates if text value changed
193
- var preview_txt_callback_delayed;
194
- //var height_set;
195
-
196
- // Register all event handlers for preview objects
197
- var preview_register = function() {
198
- // console_log('preview_register');
199
- preview_get = '?';
200
-
201
- // Instant callback
202
- preview_callback = function() {
203
- preview_update();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
204
  };
205
-
206
- // Checks if the text input is changed, if so, runs the callback with given event
207
- preview_txt_change = function(callback, event) {
208
- //console_log('checking if changed');
209
- var obj = event.target;
210
- var last = preview_last_values[obj.id];
211
- //console_log('last' + preview_last_values[obj.id]);
212
-
213
- if (obj.value != last) {
214
- //console_log('changed');
215
- // Update last value to current
216
- preview_last_values[obj.id] = obj.value;
217
- // Run callback with event
218
- callback(event);
219
  }
220
  };
221
-
222
- // Only updates when text is changed
223
- preview_txt_callback = function(event) {
224
- //console_log('txt callback');
225
- preview_txt_change(preview_update, event);
 
 
226
  };
227
-
228
- // Only updates when text is changed, but callback
229
- preview_txt_callback_delayed = function(event) {
230
- preview_txt_change(function() {
231
- clearInterval(preview_delay_timer);
232
- preview_delay_timer = setInterval(function() {
233
- //console_log('delayed update');
234
- preview_update();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
235
  clearInterval(preview_delay_timer);
236
- }, 500);
237
- }, event);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
238
  };
239
-
240
- // Retreive preview objects
241
- jQuery('[crayon-preview="1"]').each(function(i) {
242
- var obj = jQuery(this);
243
- var id = obj.attr('id');
244
- // XXX Remove prefix
245
- id = me.removePrefixFromID(id);
246
- preview_obj_names[i] = id;
247
- preview_objs[i] = obj;
248
- // To capture key up events when typing
249
- if (obj.attr('type') == 'text') {
250
- preview_last_values[obj.attr('id')] = obj.val();
251
- obj.bind('keyup', preview_txt_callback_delayed);
252
- obj.change(preview_txt_callback);
253
  } else {
254
- // For all other objects
255
- obj.change(preview_callback);
256
  }
257
- });
258
- };
259
-
260
- var toggle_error = function() {
261
- if ( msg_cbox.is(':checked') ) {
262
- msg.show();
263
- } else {
264
- msg.hide();
265
- }
266
- };
267
-
268
- var toggle_toolbar = function() {
269
- if ( toolbar.val() == 0 ) {
270
- overlay.show();
271
- } else {
272
- overlay.hide();
273
- }
274
- };
275
-
276
- this.show_langs = function(url) {
277
- // jQuery('#show-lang').hide();
278
- jQuery.get(url, function(data) {
279
- // jQuery('#lang-info').show();
280
- jQuery('#crayon-subsection-lang-info').html(data);
281
- });
282
- return false;
283
- };
284
-
285
- this.get_vars = function() {
286
- var vars = {};
287
- window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
288
- vars[key] = value;
289
- });
290
- return vars;
291
- };
292
-
293
- // Changing wrap views
294
- this.show_main = function() {
295
- theme_editor_wrap.hide();
296
- main_wrap.show();
297
- jQuery(window).scrollTop(0);
298
- return false;
299
- };
300
-
301
- this.show_theme_editor_now = function(button) {
302
- main_wrap.hide();
303
- theme_editor_wrap.show();
304
- jQuery(window).scrollTop(0);
305
-
306
- theme_editor_loading = false;
307
- button.html(button.attr('loaded'));
308
- };
309
-
310
- this.show_theme_editor = function(button, editing) {
311
- // if (theme_editor_loading) {
312
- // return;
313
- // }
314
- // theme_editor_button.css('width', theme_editor_button.width());
315
- // if (!theme_editor_loaded) {
316
- // theme_editor_loading = true;
317
- button.html(button.attr('loading'));
318
-
319
  // Simulate loading with timer
320
- // editor_timer = setInterval(function() {
321
- // clearInterval(editor_timer);
322
-
323
- CrayonThemeEditorSettings.curr_theme = jQuery('#crayon-theme').val();
324
  CrayonThemeEditorSettings.editing = editing;
325
-
326
  // Load theme editor
327
- jQuery.get(editor_url + '?curr_theme=' + CrayonThemeEditorSettings.curr_theme + '&editing=' + editing, function(data) {
 
 
328
  theme_editor_wrap.html(data);
329
- // CrayonSyntax.init();
330
-
331
  // Load url from preview into theme editor
332
- // jQuery('#crayon-editor-preview').attr('url', preview_url);
333
-
334
  // Load preview into editor
335
- CrayonSyntaxThemeEditor.init(function () {
336
- CrayonSyntaxAdmin.show_theme_editor_now(button);
337
- }, preview.clone()
338
- );
339
-
340
- // show_theme_editor_now();
341
  });
342
-
343
- // }, 2000);
344
-
345
- // theme_editor_loaded = true;
346
- // } else {
347
- // this.show_theme_editor_now();
348
- // }
349
- return false;
 
 
350
  };
351
-
352
- };
 
1
  // Crayon Syntax Highlighter Admin JavaScript
2
 
3
+ (function($) {
4
+
5
+ window.CrayonSyntaxAdmin = new function() {
6
+ var base = this;
7
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  // Preview
9
+ var preview = preview_info = preview_cbox = preview_url = preview_delay_timer = preview_get = null;
10
+ // The DOM object ids that trigger a preview update
11
+ var preview_obj_names = [];
12
+ // The jQuery objects for these objects
13
+ var preview_objs = [];
14
+ var preview_last_values = [];
 
 
 
 
 
 
 
15
  // Alignment
16
+ var align_drop = float = null;
17
+ // Toolbar
18
+ var overlay = toolbar = null;
19
+ // Error
20
+ var msg_cbox = msg = null;
21
+ // Log
22
+ var log_button = log_text = null;
23
+
24
+ var main_wrap = theme_editor_wrap = editor_url = theme_editor_edit_button = theme_editor_create_button = null;
25
+ // var theme_editor_loaded = false;
26
+ // var theme_editor_loading = false;
27
+
28
+ var settings = CrayonSyntaxSettings;
29
+
30
+ base.cssElem = function(id) {
31
+ return $(base.addPrefixToID(id));
32
+ };
33
+
34
+ // Used in Tag Editor
35
+ base.addPrefixToID = function(id) {
36
+ return id.replace(/^([#.])?(.*)$/, '$1' + settings.prefix + '$2');
37
+ };
38
+
39
+ base.removePrefixFromID = function(id) {
40
+ var re = new RegExp('^[#.]?' + settings.prefix, 'i');
41
+ return id.replace(re, '');
42
+ };
43
+
44
+ base.init = function() {
45
+ console_log('admin init');
46
+
47
+ // Wraps
48
+ main_wrap = $('#crayon-main-wrap');
49
+ theme_editor_wrap = $('#crayon-theme-editor-wrap');
50
+ editor_url = theme_editor_wrap.attr('url');
51
+ theme_editor_edit_button = $('#crayon-theme-editor-edit-button');
52
+ theme_editor_create_button = $('#crayon-theme-editor-create-button');
53
+ theme_editor_edit_button.click(function() {
54
+ CrayonSyntaxAdmin.show_theme_editor(theme_editor_edit_button,
55
+ true);
56
+ });
57
+ theme_editor_create_button.click(function() {
58
+ CrayonSyntaxAdmin.show_theme_editor(theme_editor_create_button,
59
+ false);
60
+ });
61
+
62
+ // Theme editor
63
+ var get_vars = base.get_vars();
64
+ if (get_vars['subpage'] == 'theme_editor') {
65
+ base.show_theme_editor();
 
 
 
 
 
 
 
66
  } else {
67
+ base.show_main();
68
  }
69
+
70
+ // Help
71
+ help = $('.crayon-help-close');
72
+ help.click(function() {
73
+ $('.crayon-help').hide();
74
+ $.get(help.attr('url'));
75
+ });
76
+
77
+ // Preview
78
+ preview = $('#crayon-live-preview');
79
+ preview_info = $('#crayon-preview-info');
80
+ preview_url = preview.attr('url');
81
+ preview_cbox = base.cssElem('#preview');
82
+ if (preview.length != 0) {
83
+ // Preview not needed in Tag Editor
84
+ preview_register();
85
+ preview.ready(function() {
86
+ preview_toggle();
87
+ });
88
+ preview_cbox.change(function() {
89
+ preview_toggle();
90
+ });
91
+ }
92
+
93
+ // Alignment
94
+ align_drop = base.cssElem('#h-align');
95
+ float = $('#crayon-subsection-float');
96
+ align_drop.change(function() {
97
+ float_toggle();
98
+ });
99
+ align_drop.ready(function() {
100
+ float_toggle();
101
+ });
102
+
103
+ // Custom Error
104
+ msg_cbox = base.cssElem('#error-msg-show');
105
+ msg = base.cssElem('#error-msg');
106
+ toggle_error();
107
+ msg_cbox.change(function() {
108
+ toggle_error();
109
+ });
110
+
111
+ // Toolbar
112
+ overlay = $('#crayon-subsection-toolbar');
113
+ toolbar = base.cssElem('#toolbar');
114
+ toggle_toolbar();
115
+ toolbar.change(function() {
116
+ toggle_toolbar();
117
+ });
118
+
119
+ // Copy
120
+ plain = base.cssElem('#plain');
121
+ copy = $('#crayon-subsection-copy-check');
122
+ plain.change(function() {
123
+ if (plain.is(':checked')) {
124
+ copy.show();
125
+ } else {
126
+ copy.hide();
127
+ }
128
+ });
129
+
130
+ // Log
131
+ log_wrapper = $('#crayon-log-wrapper');
132
+ log_button = $('#crayon-log-toggle');
133
+ log_text = $('#crayon-log-text');
134
+ var show_log = log_button.attr('show_txt');
135
+ var hide_log = log_button.attr('hide_txt');
136
+ clog = $('#crayon-log');
137
+ log_button.val(show_log);
138
+ log_button
139
+ .click(function() {
140
+ clog.width(log_wrapper.width());
141
+ clog.toggle();
142
+ // Scrolls content
143
+ clog.scrollTop(log_text.height());
144
+ var text = (log_button.val() == show_log ? hide_log
145
+ : show_log);
146
+ log_button.val(text);
147
+ });
148
+
149
+ };
150
+
151
+ /* Whenever a control changes preview */
152
+ var preview_update = function() {
153
+ // console_log('preview_update');
154
+ preview_get = '?';
155
+ var val = 0;
156
+ var obj;
157
+ for ( var i = 0; i < preview_obj_names.length; i++) {
158
+ obj = preview_objs[i];
159
+ if (obj.attr('type') == 'checkbox') {
160
+ val = obj.is(':checked');
161
+ } else {
162
+ val = obj.val();
163
+ }
164
+ preview_get += preview_obj_names[i] + '=' + crayon_escape(val)
165
+ + "&";
166
+ }
167
+
168
+ // XXX Scroll to top of themes
169
+ // Disabled for now, too annoying
170
+ // var top = $('a[name="crayon-theme"]');
171
+ // $(window).scrollTop(top.position().top);
172
+
173
+ // Delay resize
174
+ // preview.css('height', preview.height());
175
+ // preview.css('overflow', 'hidden');
176
+ // preview_timer = setInterval(function() {
177
+ // preview.css('height', '');
178
+ // preview.css('overflow', 'visible');
179
+ // clearInterval(preview_timer);
180
+ // }, 1000);
181
+
182
+ // Load Preview
183
+ $.get(preview_url + preview_get, function(data) {
184
+ preview.html(data);
185
+ // Important! Calls the crayon.js init
186
+ CrayonSyntax.init();
187
+ });
188
  };
189
+
190
+ var preview_toggle = function() {
191
+ // console_log('preview_toggle');
192
+ if (preview_cbox.is(':checked')) {
193
+ preview.show();
194
+ preview_info.show();
195
+ preview_update();
196
+ } else {
197
+ preview.hide();
198
+ preview_info.hide();
 
 
 
 
199
  }
200
  };
201
+
202
+ var float_toggle = function() {
203
+ if (align_drop.val() != 0) {
204
+ float.show();
205
+ } else {
206
+ float.hide();
207
+ }
208
  };
209
+
210
+ // List of callbacks
211
+ var preview_callback;
212
+ var preview_txt_change;
213
+ var preview_txt_callback; // Only updates if text value changed
214
+ var preview_txt_callback_delayed;
215
+ // var height_set;
216
+
217
+ // Register all event handlers for preview objects
218
+ var preview_register = function() {
219
+ // console_log('preview_register');
220
+ preview_get = '?';
221
+
222
+ // Instant callback
223
+ preview_callback = function() {
224
+ preview_update();
225
+ };
226
+
227
+ // Checks if the text input is changed, if so, runs the callback
228
+ // with given event
229
+ preview_txt_change = function(callback, event) {
230
+ // console_log('checking if changed');
231
+ var obj = event.target;
232
+ var last = preview_last_values[obj.id];
233
+ // console_log('last' + preview_last_values[obj.id]);
234
+
235
+ if (obj.value != last) {
236
+ // console_log('changed');
237
+ // Update last value to current
238
+ preview_last_values[obj.id] = obj.value;
239
+ // Run callback with event
240
+ callback(event);
241
+ }
242
+ };
243
+
244
+ // Only updates when text is changed
245
+ preview_txt_callback = function(event) {
246
+ // console_log('txt callback');
247
+ preview_txt_change(preview_update, event);
248
+ };
249
+
250
+ // Only updates when text is changed, but callback
251
+ preview_txt_callback_delayed = function(event) {
252
+ preview_txt_change(function() {
253
  clearInterval(preview_delay_timer);
254
+ preview_delay_timer = setInterval(function() {
255
+ // console_log('delayed update');
256
+ preview_update();
257
+ clearInterval(preview_delay_timer);
258
+ }, 500);
259
+ }, event);
260
+ };
261
+
262
+ // Retreive preview objects
263
+ $('[crayon-preview="1"]').each(function(i) {
264
+ var obj = $(this);
265
+ var id = obj.attr('id');
266
+ // XXX Remove prefix
267
+ id = base.removePrefixFromID(id);
268
+ preview_obj_names[i] = id;
269
+ preview_objs[i] = obj;
270
+ // To capture key up events when typing
271
+ if (obj.attr('type') == 'text') {
272
+ preview_last_values[obj.attr('id')] = obj.val();
273
+ obj.bind('keyup', preview_txt_callback_delayed);
274
+ obj.change(preview_txt_callback);
275
+ } else {
276
+ // For all other objects
277
+ obj.change(preview_callback);
278
+ }
279
+ });
280
+ };
281
+
282
+ var toggle_error = function() {
283
+ if (msg_cbox.is(':checked')) {
284
+ msg.show();
285
+ } else {
286
+ msg.hide();
287
+ }
288
  };
289
+
290
+ var toggle_toolbar = function() {
291
+ if (toolbar.val() == 0) {
292
+ overlay.show();
 
 
 
 
 
 
 
 
 
 
293
  } else {
294
+ overlay.hide();
 
295
  }
296
+ };
297
+
298
+ base.show_langs = function(url) {
299
+ // $('#show-lang').hide();
300
+ $.get(url, function(data) {
301
+ // $('#lang-info').show();
302
+ $('#crayon-subsection-lang-info').html(data);
303
+ });
304
+ return false;
305
+ };
306
+
307
+ base.get_vars = function() {
308
+ var vars = {};
309
+ window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,
310
+ key, value) {
311
+ vars[key] = value;
312
+ });
313
+ return vars;
314
+ };
315
+
316
+ // Changing wrap views
317
+ base.show_main = function() {
318
+ theme_editor_wrap.hide();
319
+ main_wrap.show();
320
+ $(window).scrollTop(0);
321
+ return false;
322
+ };
323
+
324
+ base.show_theme_editor_now = function(button) {
325
+ main_wrap.hide();
326
+ theme_editor_wrap.show();
327
+ $(window).scrollTop(0);
328
+
329
+ theme_editor_loading = false;
330
+ button.html(button.attr('loaded'));
331
+ };
332
+
333
+ base.show_theme_editor = function(button, editing) {
334
+ // if (theme_editor_loading) {
335
+ // return;
336
+ // }
337
+ // theme_editor_button.css('width', theme_editor_button.width());
338
+ // if (!theme_editor_loaded) {
339
+ // theme_editor_loading = true;
340
+ button.html(button.attr('loading'));
341
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
342
  // Simulate loading with timer
343
+ // editor_timer = setInterval(function() {
344
+ // clearInterval(editor_timer);
345
+
346
+ CrayonThemeEditorSettings.curr_theme = $('#crayon-theme').val();
347
  CrayonThemeEditorSettings.editing = editing;
348
+
349
  // Load theme editor
350
+ $.get(editor_url + '?curr_theme='
351
+ + CrayonThemeEditorSettings.curr_theme + '&editing='
352
+ + editing, function(data) {
353
  theme_editor_wrap.html(data);
354
+ // CrayonSyntax.init();
355
+
356
  // Load url from preview into theme editor
357
+ // $('#crayon-editor-preview').attr('url', preview_url);
358
+
359
  // Load preview into editor
360
+ CrayonSyntaxThemeEditor.init(function() {
361
+ CrayonSyntaxAdmin.show_theme_editor_now(button);
362
+ }, preview.clone());
363
+
364
+ // show_theme_editor_now();
 
365
  });
366
+
367
+ // }, 2000);
368
+
369
+ // theme_editor_loaded = true;
370
+ // } else {
371
+ // base.show_theme_editor_now();
372
+ // }
373
+ return false;
374
+ };
375
+
376
  };
377
+
378
+ })(jQueryCrayon);
379
+
js/jquery.popup.js CHANGED
@@ -19,79 +19,82 @@ jqueryPopup.defaultSettings = {
19
  event:'click'
20
  };
21
 
22
- function popupWindow(object, instanceSettings, beforeCallback, afterCallback) {
23
- beforeCallback = typeof beforeCallback !== 'undefined' ? beforeCallback : null;
24
- afterCallback = typeof afterCallback !== 'undefined' ? afterCallback : null;
25
 
26
- if (typeof object == 'string') {
27
- object = jQuery(object);
28
- }
29
- if (!(object instanceof jQuery)) {
30
- return false;
31
- }
32
- var settings = jQuery.extend({}, jqueryPopup.defaultSettings, instanceSettings || {});
33
- object.handler = jQuery(object).bind(settings.event, function() {
34
-
35
- if (beforeCallback) {
36
- beforeCallback();
37
- }
38
-
39
- var windowFeatures = 'height=' + settings.height +
40
- ',width=' + settings.width +
41
- ',toolbar=' + settings.toolbar +
42
- ',scrollbars=' + settings.scrollbars +
43
- ',status=' + settings.status +
44
- ',resizable=' + settings.resizable +
45
- ',location=' + settings.location +
46
- ',menuBar=' + settings.menubar;
47
 
48
- settings.windowName = settings.windowName || jQuery(this).attr('name');
49
- var href = jQuery(this).attr('href');
50
- if (!settings.windowURL && !(href == '#') && !(href == '')) {
51
- settings.windowURL = jQuery(this).attr('href');
52
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
54
- var centeredY,centeredX;
55
-
56
- var win = null;
57
- if (settings.centerBrowser) {
58
- if (jQuery.browser.msie) {//hacked together for IE browsers
59
- centeredY = (window.screenTop - 120) + ((((document.documentElement.clientHeight + 120)/2) - (settings.height/2)));
60
- centeredX = window.screenLeft + ((((document.body.offsetWidth + 20)/2) - (settings.width/2)));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  } else {
62
- centeredY = window.screenY + (((window.outerHeight/2) - (settings.height/2)));
63
- centeredX = window.screenX + (((window.outerWidth/2) - (settings.width/2)));
64
  }
65
- win = window.open(settings.windowURL, settings.windowName, windowFeatures+',left=' + centeredX +',top=' + centeredY);
66
- } else if (settings.centerScreen) {
67
- centeredY = (screen.height - settings.height)/2;
68
- centeredX = (screen.width - settings.width)/2;
69
- win = window.open(settings.windowURL, settings.windowName, windowFeatures+',left=' + centeredX +',top=' + centeredY);
70
- } else {
71
- win = window.open(settings.windowURL, settings.windowName, windowFeatures+',left=' + settings.left +',top=' + settings.top);
72
- }
73
- if (win != null) {
74
- win.focus();
75
- if (settings.data) {
76
- win.document.write(settings.data);
77
  }
 
 
 
 
 
 
 
78
  }
79
-
80
- if (afterCallback) {
81
- afterCallback();
82
  }
83
- });
84
- return settings;
85
- }
86
-
87
- function popdownWindow(object, event) {
88
- if (typeof event == 'undefined') {
89
- event = 'click';
90
- }
91
- object = jQuery(object);
92
- if (!(object instanceof jQuery)) {
93
- return false;
94
- }
95
- object.unbind(event, object.handler);
96
- }
97
 
 
19
  event:'click'
20
  };
21
 
22
+ (function ($) {
 
 
23
 
24
+ popupWindow = function (object, instanceSettings, beforeCallback, afterCallback) {
25
+ beforeCallback = typeof beforeCallback !== 'undefined' ? beforeCallback : null;
26
+ afterCallback = typeof afterCallback !== 'undefined' ? afterCallback : null;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
+ if (typeof object == 'string') {
29
+ object = jQuery(object);
 
 
30
  }
31
+ if (!(object instanceof jQuery)) {
32
+ return false;
33
+ }
34
+ var settings = jQuery.extend({}, jqueryPopup.defaultSettings, instanceSettings || {});
35
+ object.handler = jQuery(object).bind(settings.event, function() {
36
+
37
+ if (beforeCallback) {
38
+ beforeCallback();
39
+ }
40
+
41
+ var windowFeatures = 'height=' + settings.height +
42
+ ',width=' + settings.width +
43
+ ',toolbar=' + settings.toolbar +
44
+ ',scrollbars=' + settings.scrollbars +
45
+ ',status=' + settings.status +
46
+ ',resizable=' + settings.resizable +
47
+ ',location=' + settings.location +
48
+ ',menuBar=' + settings.menubar;
49
 
50
+ settings.windowName = settings.windowName || jQuery(this).attr('name');
51
+ var href = jQuery(this).attr('href');
52
+ if (!settings.windowURL && !(href == '#') && !(href == '')) {
53
+ settings.windowURL = jQuery(this).attr('href');
54
+ }
55
+
56
+ var centeredY,centeredX;
57
+
58
+ var win = null;
59
+ if (settings.centerBrowser) {
60
+ if (jQuery.browser.msie) {//hacked together for IE browsers
61
+ centeredY = (window.screenTop - 120) + ((((document.documentElement.clientHeight + 120)/2) - (settings.height/2)));
62
+ centeredX = window.screenLeft + ((((document.body.offsetWidth + 20)/2) - (settings.width/2)));
63
+ } else {
64
+ centeredY = window.screenY + (((window.outerHeight/2) - (settings.height/2)));
65
+ centeredX = window.screenX + (((window.outerWidth/2) - (settings.width/2)));
66
+ }
67
+ win = window.open(settings.windowURL, settings.windowName, windowFeatures+',left=' + centeredX +',top=' + centeredY);
68
+ } else if (settings.centerScreen) {
69
+ centeredY = (screen.height - settings.height)/2;
70
+ centeredX = (screen.width - settings.width)/2;
71
+ win = window.open(settings.windowURL, settings.windowName, windowFeatures+',left=' + centeredX +',top=' + centeredY);
72
  } else {
73
+ win = window.open(settings.windowURL, settings.windowName, windowFeatures+',left=' + settings.left +',top=' + settings.top);
 
74
  }
75
+ if (win != null) {
76
+ win.focus();
77
+ if (settings.data) {
78
+ win.document.write(settings.data);
79
+ }
80
+ }
81
+
82
+ if (afterCallback) {
83
+ afterCallback();
 
 
 
84
  }
85
+ });
86
+ return settings;
87
+ };
88
+
89
+ popdownWindow = function(object, event) {
90
+ if (typeof event == 'undefined') {
91
+ event = 'click';
92
  }
93
+ object = jQuery(object);
94
+ if (!(object instanceof jQuery)) {
95
+ return false;
96
  }
97
+ object.unbind(event, object.handler);
98
+ };
 
 
 
 
 
 
 
 
 
 
 
 
99
 
100
+ })(jQueryCrayon);
js/util.js CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  var CRAYON_DEBUG = false;
2
 
3
  if (typeof CrayonTagEditorSettings == 'undefined') {
@@ -52,16 +55,30 @@ function crayon_encode_html(str) {
52
  .replace(/>/g, '&gt;');
53
  }
54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  //http://stackoverflow.com/questions/2360655/jquery-event-handlers-always-execute-in-order-they-were-bound-any-way-around-t
56
 
57
  //[name] is the name of the event "click", "mouseover", ..
58
  //same as you'd pass it to bind()
59
  //[fn] is the handler function
60
- jQuery.fn.bindFirst = function(name, fn) {
61
  // bind as you normally would
62
  // don't want to miss out on any jQuery magic
63
  this.bind(name, fn);
64
-
65
  // Thanks to a comment by @Martin, adding support for
66
  // namespaced events too.
67
  var handlers = this.data('events')[name.split('.')[0]];
@@ -69,4 +86,5 @@ jQuery.fn.bindFirst = function(name, fn) {
69
  var handler = handlers.pop();
70
  // move it at the beginning
71
  handlers.splice(0, 0, handler);
72
- };
 
1
+ // To avoid duplicates conflicting
2
+ var jQueryCrayon = jQuery.noConflict();
3
+
4
  var CRAYON_DEBUG = false;
5
 
6
  if (typeof CrayonTagEditorSettings == 'undefined') {
55
  .replace(/>/g, '&gt;');
56
  }
57
 
58
+ var CrayonSyntaxUtil = new function() {
59
+ this.getExt = function(str) {
60
+ if (str.indexOf('.') == -1) {
61
+ return undefined;
62
+ }
63
+ var ext = str.split('.');
64
+ if (ext.length) {
65
+ ext = ext[ext.length-1];
66
+ } else {
67
+ ext = '';
68
+ }
69
+ return ext;
70
+ };
71
+ };
72
+
73
  //http://stackoverflow.com/questions/2360655/jquery-event-handlers-always-execute-in-order-they-were-bound-any-way-around-t
74
 
75
  //[name] is the name of the event "click", "mouseover", ..
76
  //same as you'd pass it to bind()
77
  //[fn] is the handler function
78
+ jQueryCrayon.fn.bindFirst = function(name, fn) {
79
  // bind as you normally would
80
  // don't want to miss out on any jQuery magic
81
  this.bind(name, fn);
 
82
  // Thanks to a comment by @Martin, adding support for
83
  // namespaced events too.
84
  var handlers = this.data('events')[name.split('.')[0]];
86
  var handler = handlers.pop();
87
  // move it at the beginning
88
  handlers.splice(0, 0, handler);
89
+ };
90
+
langs/aliases.txt CHANGED
@@ -16,3 +16,4 @@ as flash swf fla
16
  ps powershell
17
  asm x86
18
  perl pl
 
16
  ps powershell
17
  asm x86
18
  perl pl
19
+ delphi pascal
langs/applescript/applescript.txt ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### APPLESCRIPT LANGUAGE ###
2
+
3
+ # ELEMENT_NAME [optional-css-class] REGULAR_EXPRESSION
4
+
5
+ NAME AppleScript
6
+ VERSION 1.9.13
7
+
8
+ COMMENT ((--|#).*?$)|(\(\*.*?\*\))
9
+ STRING (?default)
10
+
11
+ STATEMENT \b(?alt:statement.txt)\b
12
+ RESERVED \b(?alt:reserved.txt)\b
13
+
14
+ CONSTANT (?default)
15
+ ENTITY \b(?alt:entity.txt)\b
16
+
17
+ IDENTIFIER (?default)
18
+ OPERATOR (?default)
19
+ SYMBOL (?default)
langs/applescript/entity.txt ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ set the clipboard to
2
+ choose from list
3
+ do shell script
4
+ default answer
5
+ display dialog
6
+ strikethrough
7
+ do JavaScript
8
+ AppleScript
9
+ choose folder
10
+ missing value
11
+ the clipboard
12
+ diacriticals
13
+ application
14
+ punctuation
15
+ superscript
16
+ choose file
17
+ quoted form
18
+ invisibles
19
+ delimiters
20
+ paragraphs
21
+ POSIX path
22
+ POSIX file
23
+ properties
24
+ duplicate
25
+ expansion
26
+ condensed
27
+ subscript
28
+ underline
29
+ wednesday
30
+ september
31
+ shut down
32
+ offset of
33
+ paragraph
34
+ receiving
35
+ selection
36
+ extension
37
+ anything
38
+ expanded
39
+ thursday
40
+ saturday
41
+ february
42
+ november
43
+ december
44
+ contents
45
+ activate
46
+ document
47
+ info for
48
+ path to
49
+ integer
50
+ version
51
+ hyphens
52
+ outline
53
+ weekday
54
+ tuesday
55
+ january
56
+ october
57
+ minutes
58
+ folders
59
+ restart
60
+ buttons
61
+ desktop
62
+ content
63
+ between
64
+ against
65
+ delete
66
+ exists
67
+ launch
68
+ reopen
69
+ saving
70
+ number
71
+ string
72
+ result
73
+ hidden
74
+ italic
75
+ shadow
76
+ monday
77
+ friday
78
+ sunday
79
+ august
80
+ folder
81
+ window
82
+ reveal
83
+ adding
84
+ bounds
85
+ close
86
+ count
87
+ print
88
+ alias
89
+ space
90
+ plain
91
+ false
92
+ month
93
+ march
94
+ april
95
+ quote
96
+ hours
97
+ weeks
98
+ files
99
+ eject
100
+ sleep
101
+ items
102
+ make
103
+ move
104
+ open
105
+ quit
106
+ save
107
+ idle
108
+ list
109
+ text
110
+ case
111
+ bold
112
+ true
113
+ june
114
+ july
115
+ name
116
+ days
117
+ file
118
+ disk
119
+ item
120
+ beep
121
+ into
122
+ onto
123
+ run
124
+ tab
125
+ ask
126
+ yes
127
+ mon
128
+ tue
129
+ wed
130
+ thu
131
+ fri
132
+ sat
133
+ sun
134
+ jan
135
+ feb
136
+ mar
137
+ apr
138
+ may
139
+ jun
140
+ jul
141
+ aug
142
+ sep
143
+ oct
144
+ nov
145
+ dec
146
+ new
147
+ it
148
+ me
149
+ pi
150
+ no
151
+ id
152
+ by
langs/applescript/reserved.txt ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ beginning
2
+ contains
3
+ seventh
4
+ through
5
+ greater
6
+ second
7
+ fourth
8
+ eighth
9
+ middle
10
+ before
11
+ equals
12
+ every
13
+ whose
14
+ where
15
+ index
16
+ first
17
+ third
18
+ fifth
19
+ sixth
20
+ ninth
21
+ tenth
22
+ front
23
+ named
24
+ after
25
+ equal
26
+ each
27
+ some
28
+ last
29
+ back
30
+ thru
31
+ isnt
32
+ less
33
+ the
34
+ div
35
+ mod
36
+ and
37
+ not
38
+ st
39
+ nd
40
+ rd
41
+ th
42
+ as
43
+ or
langs/applescript/statement.txt ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ considering
2
+ transaction
3
+ property
4
+ continue
5
+ ignoring
6
+ without
7
+ timeout
8
+ script
9
+ global
10
+ return
11
+ repeat
12
+ local
13
+ given
14
+ times
15
+ while
16
+ until
17
+ error
18
+ prop
19
+ with
20
+ tell
21
+ then
22
+ else
23
+ from
24
+ exit
25
+ copy
26
+ end
27
+ set
28
+ try
29
+ get
30
+ put
31
+ to
32
+ on
33
+ of
34
+ in
35
+ if
36
+ my
37
+ is
langs/delphi/delphi.txt ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### DELPHI LANGUAGE ###
2
+
3
+ # ELEMENT_NAME [optional-css-class] REGULAR_EXPRESSION
4
+
5
+ NAME Delphi/Pascal
6
+ VERSION 1.0.0
7
+
8
+ COMMENT (?default)
9
+ STRING (?default)
10
+
11
+ NOTATION \@[\w-]+
12
+ STATEMENT \b(?alt:statement.txt)\b
13
+ RESERVED (?default)|\b(?alt:reserved.txt)\b
14
+ TYPE (?default)|\b(?alt:type.txt)\b
15
+ MODIFIER \b(?alt:modifier.txt)\b
16
+
17
+ ENTITY (?default)|\b[a-z_]\w+\s*\|\s*[a-z_]\w+\b\s+(?=\b[a-z_]\w+\b)
18
+ VARIABLE (?default)
19
+ GENERIC:ENTITY <\w+>
20
+ IDENTIFIER (?default)
21
+ CONSTANT (?default)
22
+ OPERATOR \b(?alt:operator.txt)\b
23
+ SYMBOL (?default)
langs/delphi/modifier.txt ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ property
2
+ virtual
3
+ extern
4
+ stdcall
5
+ override
6
+ overload
7
+ reintroduce
8
+ interface
9
+ public
10
+ private
11
+ protected
12
+ implementation
13
+ const
14
+ constructor
15
+ destructor
16
+ uses
17
+ unit
18
+ initialization
19
+ class
20
+ end.
langs/delphi/operator.txt ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Grouped operators
2
+ and
3
+ not
4
+ or
5
+ div
6
+ mod
7
+ :=
8
+ <>
9
+ <=
10
+ >=
11
+
12
+ # Single operators
13
+ %
14
+ ^
15
+ ~
16
+ &
17
+ |
18
+ !
19
+ =
20
+ <
21
+ >
22
+ +
23
+ -
24
+ *
25
+ /
langs/delphi/reserved.txt ADDED
@@ -0,0 +1,314 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Functions
2
+ Abs
3
+ Addr
4
+ AnsiCompareStr
5
+ AnsiCompareText
6
+ AnsiContainsStr
7
+ AnsiContainsText
8
+ AnsiEndsStr
9
+ AnsiIndexStr
10
+ AnsiLeftStr
11
+ AnsiLowerCase
12
+ AnsiMatchStr
13
+ AnsiMidStr
14
+ AnsiPos
15
+ AnsiReplaceStr
16
+ AnsiReverseString
17
+ AnsiRightStr
18
+ AnsiStartsStr
19
+ AnsiUpperCase
20
+ ArcCos
21
+ ArcSin
22
+ ArcTan
23
+ Assigned
24
+ BeginThread
25
+ Bounds
26
+ CelsiusToFahrenheit
27
+ ChangeFileExt
28
+ Convert
29
+ CompareStr
30
+ CompareText
31
+ CompareValue
32
+ Concat
33
+ Convert
34
+ Copy
35
+ Cos
36
+ CreateDir
37
+ CurrToStr
38
+ CurrToStrF
39
+ Date
40
+ DateTimeToFileDate
41
+ DateTimeToStr
42
+ DateToStr
43
+ DayOfTheMonth
44
+ DayOfTheWeek
45
+ DayOfTheYear
46
+ DayOfWeek
47
+ DaysBetween
48
+ DaysInAMonth
49
+ DaysInAYear
50
+ DaySpan
51
+ DegToRad
52
+ DeleteFile
53
+ DirectoryExists
54
+ DiskFree
55
+ DiskSize
56
+ DupeString
57
+ EncodeDate
58
+ EncodeDateTime
59
+ EncodeTime
60
+ EndOfADay
61
+ EndOfAMonth
62
+ Eof
63
+ Eoln
64
+ Exp
65
+ ExtractFileDir
66
+ ExtractFileDrive
67
+ ExtractFileExt
68
+ ExtractFileName
69
+ ExtractFilePath
70
+ FahrenheitToCelsius
71
+ FileAge
72
+ FileDateToDateTime
73
+ FileExists
74
+ FileGetAttr
75
+ FilePos
76
+ FileSearch
77
+ FileSetAttr
78
+ FileSetDate
79
+ FileSize
80
+ FindClose
81
+ FindCmdLineSwitch
82
+ FindFirst
83
+ FindNext
84
+ FloatToStr
85
+ FloatToStrF
86
+ ForceDirectories
87
+ Format
88
+ FormatCurr
89
+ FormatDateTime
90
+ FormatFloat
91
+ Frac
92
+ GetCurrentDir
93
+ GetLastError
94
+ GetMem
95
+ Hi
96
+ High
97
+ IncDay
98
+ IncHour
99
+ IncMillisecond
100
+ IncMinute
101
+ IncMonth
102
+ IncSecond
103
+ IncYear
104
+ InputBox
105
+ InputQuery
106
+ Int
107
+ IntToHex
108
+ IntToStr
109
+ IOResult
110
+ IsInfinite
111
+ IsLeapYear
112
+ IsMultiThread
113
+ IsNaN
114
+ LastDelimiter
115
+ Length
116
+ Ln
117
+ Lo
118
+ Log10
119
+ Low
120
+ LowerCase
121
+ Max
122
+ Mean
123
+ MessageDlg
124
+ MessageDlgPos
125
+ Min
126
+ MonthOfTheYear
127
+ Now
128
+ Odd
129
+ Ord
130
+ ParamCount
131
+ ParamStr
132
+ Pi
133
+ Point
134
+ PointsEqual
135
+ Pos
136
+ Pred
137
+ Printer
138
+ PromptForFileName
139
+ PtInRect
140
+ RadToDeg
141
+ Random
142
+ RandomRange
143
+ RecodeDate
144
+ RecodeTime
145
+ Rect
146
+ RemoveDir
147
+ RenameFile
148
+ Round
149
+ SeekEof
150
+ SeekEoln
151
+ SelectDirectory
152
+ SetCurrentDir
153
+ Sin
154
+ SizeOf
155
+ Slice
156
+ Sqr
157
+ Sqrt
158
+ StringOfChar
159
+ StringReplace
160
+ StringToWideChar
161
+ StrScan
162
+ StrToCurr
163
+ StrToDate
164
+ StrToDateTime
165
+ StrToFloat
166
+ StrToInt
167
+ StrToInt64
168
+ StrToInt64Def
169
+ StrToIntDef
170
+ StrToTime
171
+ StuffString
172
+ Succ
173
+ Sum
174
+ Tan
175
+ Time
176
+ TimeToStr
177
+ Tomorrow
178
+ Trim
179
+ TrimLeft
180
+ TrimRight
181
+ Trunc
182
+ UpCase
183
+ UpperCase
184
+ VarType
185
+ WideCharToString
186
+ WrapText
187
+ Yesterday
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+ # working on these
196
+ absolute
197
+ abstract
198
+ and
199
+ Application
200
+ as
201
+ asm
202
+ assembler
203
+ at
204
+ automated
205
+ case
206
+ cdecl
207
+ class
208
+ comp
209
+ const
210
+ constructor
211
+ contains
212
+ default
213
+ deprecated
214
+ destructor
215
+ dispid
216
+ dispinterface
217
+ div
218
+ do
219
+ downto
220
+ dynamic
221
+ else
222
+ end
223
+ except
224
+ Exception
225
+ export
226
+ exports
227
+ external
228
+ false
229
+ far
230
+ file
231
+ final
232
+ finalization
233
+ finally
234
+ for
235
+ forward
236
+ function
237
+ goto
238
+ if
239
+ implementation
240
+ implements
241
+ in
242
+ index
243
+ inherited
244
+ initialization
245
+ inline
246
+ interface
247
+ is
248
+ label
249
+ library
250
+ local
251
+ message
252
+ mod
253
+ name
254
+ near
255
+ nil
256
+ null
257
+ nodefault
258
+ not
259
+ of
260
+ on
261
+ or
262
+ out
263
+ overload
264
+ override
265
+ package
266
+ packed
267
+ pascal
268
+ platform
269
+ private
270
+ procedure
271
+ program
272
+ property
273
+ protected
274
+ public
275
+ published
276
+ raise
277
+ read
278
+ readonly
279
+ record
280
+ register
281
+ reintroduce
282
+ remove
283
+ repeat
284
+ requires
285
+ resident
286
+ resourcestring
287
+ safecall
288
+ Self
289
+ set
290
+ shl
291
+ shr
292
+ static
293
+ stdcall
294
+ stored
295
+ strictprivate
296
+ strictprotected
297
+ then
298
+ threadvar
299
+ to
300
+ true
301
+ try
302
+ type
303
+ unit
304
+ unsafe
305
+ until
306
+ uses
307
+ var
308
+ varargs
309
+ virtual
310
+ while
311
+ with
312
+ write
313
+ writeonly
314
+ xor
langs/delphi/statement.txt ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ begin
2
+ continue
3
+ switch
4
+ break
5
+ result
6
+ finally
7
+ raise
8
+ while
9
+ then
10
+ case
11
+ else
12
+ goto
13
+ and
14
+ for
15
+ try
16
+ xor
17
+ not
18
+ end
19
+ as
20
+ do
21
+ if
22
+ or
23
+ in
24
+ is
25
+ to
26
+ downto
langs/delphi/type.txt ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Byte
2
+ PByte
3
+ ShortInt
4
+ PShortInt
5
+ Word
6
+ PWord
7
+ SmallInt
8
+ PSmallInt
9
+ Cardinal
10
+ PCardinal
11
+ LongWord
12
+ PLongWord
13
+ Integer
14
+ PInteger
15
+ LongInt
16
+ PLongint
17
+ UInt64
18
+ PUInt64
19
+ Int64
20
+ PInt64
21
+ Single
22
+ PSingle
23
+ TSingleRec
24
+ Double
25
+ PDouble
26
+ TDoubleRec
27
+ Extended
28
+ Real
29
+ AnsiChar
30
+ PAnsiChar
31
+ Char
32
+ PChar
33
+ WideChar
34
+ PWideChar
35
+ AnsiString
36
+ PAnsiString
37
+ RawByteString
38
+ PRawByteString
39
+ UnicodeString
40
+ PUnicodeString
41
+ String
42
+ PString
43
+ ShortString
44
+ PShortString
45
+ WideString
46
+ PWideString
47
+ TextFile
48
+ Text
49
+ Boolean
50
+ PBoolean
51
+ ByteBool
52
+ WordBool
53
+ PWordBool
54
+ LongBool
55
+ PLongBool
56
+ Array
57
+ Record
58
+ Variant
59
+ PVariant
60
+ Pointer
61
+ PPointer
62
+ Currency
63
+ PCurrency
64
+ tstringlist
65
+ tstrings
66
+ tobject
67
+ tdatetime
68
+ tdate
69
+ ttime
70
+ PTextBuff
71
+ Byte
72
+ Cardinal
langs/extensions.txt CHANGED
@@ -13,4 +13,6 @@ python py pyw pyc pyo pyd
13
  vb vbs
14
  ruby rb rbx rhtml
15
  as swf fla
16
- perl pl
 
 
13
  vb vbs
14
  ruby rb rbx rhtml
15
  as swf fla
16
+ perl pl
17
+ delphi pas
18
+ applescript scpt applescript
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: akarmenia
3
  Donate link: https://www.paypal.com/au/cgi-bin/webscr?cmd=_flow&SESSION=PPqWIQJ0gEZp4pVGNnYzhcwFGvx3MGwD95tvUcZgeYlHIEjBS7x6QHG34B4&dispatch=5885d80a13c0db1f8e263663d3faee8d0288a7fd2903afb85a5540fd44243d03
4
  Tags: syntax highlighter, syntax, highlighter, highlighting, crayon, code highlighter
5
  Requires at least: 3.0
6
- Tested up to: 3.4
7
- Stable tag: 1.9.11
8
 
9
  Syntax Highlighter supporting multiple languages, themes, fonts, highlighting from a URL, local file or post text.
10
 
@@ -66,12 +66,14 @@ See the <a href="http://ak.net84.net/projects/crayon-language-file-specification
66
  * ABAP
67
  * ActionScript
68
  * Apache
 
69
  * Assembly (x86)
70
  * AutoIt
71
  * C
72
  * C#
73
  * C++
74
  * CSS
 
75
  * Haskell
76
  * HTML (XML/XHTML)
77
  * Lua
@@ -95,9 +97,10 @@ See the <a href="http://ak.net84.net/projects/crayon-language-file-specification
95
  **International Languages**
96
 
97
  * Chinese (Simplified, thanks to <a href="http://smerpup.com/" target="_blank">Dezhi Liu</a> & <a href="http://neverno.me/" target="_blank">Jash Yin</a>)
 
98
  * French
99
  * German (thanks to <a href="http://www.technologyblog.de/" target="_blank">Stephan Knau&szlig;</a>)
100
- * Italian
101
  * Lithuanian (thanks to <a href="http://www.host1free.com" target="_blank">Vincent G</a>)
102
  * Spanish
103
  * Japanese (thanks to <a href="https://twitter.com/#!/west_323" target="_blank">@west_323</a>)
@@ -119,7 +122,7 @@ These are helpful for discovering new features.
119
 
120
  A handful of articles from others written about Crayon, thanks guys!
121
 
122
-
123
  * <a href="http://selfpwnt.com/crayon-syntax-highlighter-and-its-studly-author/" target="_blank">Crayon Syntax Highlighter (and its studly author)</a>
124
  * <a href="http://bit51.com/add-code-to-your-wordpress-posts-with-crayon-syntax-highlighter/" target="_blank">Add Code To Your WordPress Posts With Crayon Syntax Highlighter</a>
125
  * <a href="http://www.wpsquare.com/syntax-highlighter-wordpress-plugins/" target="_blank">15 Best Syntax Highlighter WordPress Plugins</a>
@@ -137,6 +140,9 @@ A handful of articles from others written about Crayon, thanks guys!
137
 
138
  * Performance, minimised resources
139
  * Theme Editor
 
 
 
140
 
141
  == Installation ==
142
 
@@ -199,6 +205,21 @@ Contact me at http://twitter.com/crayonsyntax or crayon.syntax@gmail.com.
199
 
200
  == Changelog ==
201
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  = 1.9.11 =
203
  * Fixed an issue with IE 8 throwing JS errors for setStyleProperty
204
  * Fixed yet another issue with \r\n causing incorrect span tags, refactored code.
@@ -638,6 +659,7 @@ Make sure to upgrade to the latest release when possible to ensure you avoid bug
638
 
639
  Thanks to all those who donate to my project, your support keeps the Crayons going!
640
 
 
641
  * Oldrich Strachota, (http://www.strachota.net/), Czech Republic
642
  * Dividend Ninja, (http://dividendninja.com/), Canada
643
  * Chris Wiegman, (http://bit51.com/), USA
3
  Donate link: https://www.paypal.com/au/cgi-bin/webscr?cmd=_flow&SESSION=PPqWIQJ0gEZp4pVGNnYzhcwFGvx3MGwD95tvUcZgeYlHIEjBS7x6QHG34B4&dispatch=5885d80a13c0db1f8e263663d3faee8d0288a7fd2903afb85a5540fd44243d03
4
  Tags: syntax highlighter, syntax, highlighter, highlighting, crayon, code highlighter
5
  Requires at least: 3.0
6
+ Tested up to: 3.4.1
7
+ Stable tag: 1.10
8
 
9
  Syntax Highlighter supporting multiple languages, themes, fonts, highlighting from a URL, local file or post text.
10
 
66
  * ABAP
67
  * ActionScript
68
  * Apache
69
+ * AppleScript
70
  * Assembly (x86)
71
  * AutoIt
72
  * C
73
  * C#
74
  * C++
75
  * CSS
76
+ * Delphi/Pascal (thanks to <a href="http://squashbrain.com/" target="_blank">Chris McClenny</a>)
77
  * Haskell
78
  * HTML (XML/XHTML)
79
  * Lua
97
  **International Languages**
98
 
99
  * Chinese (Simplified, thanks to <a href="http://smerpup.com/" target="_blank">Dezhi Liu</a> & <a href="http://neverno.me/" target="_blank">Jash Yin</a>)
100
+ * Dutch (thanks to <a href="https://twitter.com/#!/chilionsnoek" target="_blank">Chilion Snoek</a>)
101
  * French
102
  * German (thanks to <a href="http://www.technologyblog.de/" target="_blank">Stephan Knau&szlig;</a>)
103
+ * Italian (thanks to <a href="http://www.federicobellucci.net/" target="_blank">Federico Bellucci</a>)
104
  * Lithuanian (thanks to <a href="http://www.host1free.com" target="_blank">Vincent G</a>)
105
  * Spanish
106
  * Japanese (thanks to <a href="https://twitter.com/#!/west_323" target="_blank">@west_323</a>)
122
 
123
  A handful of articles from others written about Crayon, thanks guys!
124
 
125
+ * <a href="http://www.trynull.com/2012/06/15/finally-wordpress-code-syntax-highlighting-that-works/" target="_blank">Finally!… WordPress code syntax highlighting that works</a>
126
  * <a href="http://selfpwnt.com/crayon-syntax-highlighter-and-its-studly-author/" target="_blank">Crayon Syntax Highlighter (and its studly author)</a>
127
  * <a href="http://bit51.com/add-code-to-your-wordpress-posts-with-crayon-syntax-highlighter/" target="_blank">Add Code To Your WordPress Posts With Crayon Syntax Highlighter</a>
128
  * <a href="http://www.wpsquare.com/syntax-highlighter-wordpress-plugins/" target="_blank">15 Best Syntax Highlighter WordPress Plugins</a>
140
 
141
  * Performance, minimised resources
142
  * Theme Editor
143
+ * Line wrapping
144
+ * Go language support
145
+ * Integrated commenting
146
 
147
  == Installation ==
148
 
205
 
206
  == Changelog ==
207
 
208
+ = 1.10 =
209
+ * Added Dutch translation thanks to <a href="https://twitter.com/#!/chilionsnoek">@chilionsnoek</a>.
210
+ * Added Delphi/Pascal thanks to Chris McClenny (http://squashbrain.com/)
211
+ * Added AppleScript
212
+ * Language is automatically selected from the Tag Editor dropdown as you type a URL with an extension (e.g. typing "cs" would select "C#")
213
+ * Fixed a preventing language being detected from extension
214
+ * Fixed a bug causing crayon:false to be ignored in the class tag
215
+ * Cleaned up crayon's js so it's not possible to overwrite the jQuery instance
216
+ * Fixed bug causing repeats of Crayon due to broken tags from using Mini Tags
217
+ * Fixed isses with ignoring Mini Tags with $
218
+ * Added Italian translation thanks to Federico Bellucci (http://www.federicobellucci.net/)
219
+
220
+ = 1.9.12 =
221
+ * Fixed a bug caused by unescaped HTML elements in the plain code breaking the page markup, reverted to escaped and uses the new sanitisation method.
222
+
223
  = 1.9.11 =
224
  * Fixed an issue with IE 8 throwing JS errors for setStyleProperty
225
  * Fixed yet another issue with \r\n causing incorrect span tags, refactored code.
659
 
660
  Thanks to all those who donate to my project, your support keeps the Crayons going!
661
 
662
+ * Jeff Benshetler, USA
663
  * Oldrich Strachota, (http://www.strachota.net/), Czech Republic
664
  * Dividend Ninja, (http://dividendninja.com/), Canada
665
  * Chris Wiegman, (http://bit51.com/), USA
trans/crayon-syntax-highlighter-it_IT.mo CHANGED
Binary file
trans/crayon-syntax-highlighter-it_IT.po CHANGED
@@ -2,7 +2,7 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: crayon-syntax-highlighter\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2012-05-06 12:45+1000\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: \n"
8
  "Language-Team: \n"
@@ -20,35 +20,35 @@ msgstr ""
20
  "X-Poedit-SearchPath-1: ..\n"
21
 
22
  # @ crayon-syntax-highlighter
23
- #: ../crayon_formatter.class.php:266
24
  msgid "Toggle Plain Code"
25
- msgstr "Alterna Codice Pianura"
26
 
27
  # @ crayon-syntax-highlighter
28
- #: ../crayon_formatter.class.php:268
29
  #, php-format
30
  msgid "Press %s to Copy, %s to Paste"
31
- msgstr "Stampa %s per Copia, Incolla per %s"
32
 
33
  # @ crayon-syntax-highlighter
34
- #: ../crayon_formatter.class.php:268
35
  msgid "Copy Plain Code"
36
- msgstr "Copia il codice di Pianura"
37
 
38
  # @ crayon-syntax-highlighter
39
- #: ../crayon_formatter.class.php:270
40
  msgid "Open Code In New Window"
41
- msgstr "Codice Apri in una nuova finestra"
42
 
43
  # @ crayon-syntax-highlighter
44
- #: ../crayon_formatter.class.php:273
45
  msgid "Toggle Line Numbers"
46
- msgstr "Numeri di riga passare"
47
 
48
  # @ crayon-syntax-highlighter
49
- #: ../crayon_formatter.class.php:279
50
  msgid "Contains Mixed Languages"
51
- msgstr "Contiene lingue miste"
52
 
53
  # @ crayon-syntax-highlighter
54
  #: ../crayon_settings.class.php:138
@@ -96,9 +96,9 @@ msgstr "Statico"
96
  # @ crayon-syntax-highlighter
97
  #: ../crayon_settings.class.php:152
98
  #: ../crayon_settings.class.php:156
99
- #: ../crayon_settings_wp.class.php:541
100
- #: ../crayon_settings_wp.class.php:550
101
- #: ../crayon_settings_wp.class.php:649
102
  msgid "Pixels"
103
  msgstr "Pixels"
104
 
@@ -159,657 +159,677 @@ msgstr "Su doppio click"
159
  # @ crayon-syntax-highlighter
160
  #: ../crayon_settings.class.php:189
161
  msgid "On Single Click"
162
- msgstr "Il singolo click"
163
 
164
  # @ crayon-syntax-highlighter
165
  #: ../crayon_settings.class.php:189
166
  msgid "Disable Mouse Events"
167
- msgstr "Disabilitare eventi di mouse"
168
 
169
  # @ crayon-syntax-highlighter
170
  #: ../crayon_settings.class.php:196
171
  msgid "An error has occurred. Please try again later."
172
- msgstr "È verificato un errore. Riprova più tardi."
173
 
174
  # @ crayon-syntax-highlighter
175
  #: ../crayon_settings_wp.class.php:44
176
- #: ../crayon_settings_wp.class.php:118
177
- #: ../crayon_settings_wp.class.php:802
178
  msgid "Settings"
179
  msgstr "Impostazioni"
180
 
181
  # @ crayon-syntax-highlighter
182
- #: ../crayon_settings_wp.class.php:99
183
  msgid "You do not have sufficient permissions to access this page."
184
  msgstr "Non si dispone di autorizzazioni sufficienti per accedere a questa pagina."
185
 
186
  # @ crayon-syntax-highlighter
187
- #: ../crayon_settings_wp.class.php:130
188
  msgid "Save Changes"
189
  msgstr "Salva le modifiche"
190
 
191
  # @ crayon-syntax-highlighter
192
- #: ../crayon_settings_wp.class.php:136
193
  msgid "Reset Settings"
194
  msgstr "Ripristina Impostazioni"
195
 
196
  # @ crayon-syntax-highlighter
197
- #: ../crayon_settings_wp.class.php:301
198
  msgid "General"
199
  msgstr "General"
200
 
201
  # @ crayon-syntax-highlighter
202
- #: ../crayon_settings_wp.class.php:302
203
  msgid "Theme"
204
  msgstr "Tema"
205
 
206
  # @ crayon-syntax-highlighter
207
- #: ../crayon_settings_wp.class.php:303
208
  msgid "Font"
209
- msgstr "Sono"
210
 
211
  # @ crayon-syntax-highlighter
212
- #: ../crayon_settings_wp.class.php:304
213
  msgid "Metrics"
214
  msgstr "Metrica"
215
 
216
  # @ crayon-syntax-highlighter
217
- #: ../crayon_settings_wp.class.php:305
218
  msgid "Toolbar"
219
  msgstr "Toolbar"
220
 
221
  # @ crayon-syntax-highlighter
222
- #: ../crayon_settings_wp.class.php:306
223
  msgid "Lines"
224
  msgstr "Linee"
225
 
226
  # @ crayon-syntax-highlighter
227
- #: ../crayon_settings_wp.class.php:307
228
  msgid "Code"
229
  msgstr "Codice"
230
 
231
  # @ crayon-syntax-highlighter
232
- #: ../crayon_settings_wp.class.php:308
233
  msgid "Tags"
234
  msgstr "Tags"
235
 
236
  # @ crayon-syntax-highlighter
237
- #: ../crayon_settings_wp.class.php:309
238
  msgid "Languages"
239
  msgstr "Lingue"
240
 
241
  # @ crayon-syntax-highlighter
242
- #: ../crayon_settings_wp.class.php:310
243
  msgid "Files"
244
  msgstr "File"
245
 
246
  # @ crayon-syntax-highlighter
247
- #: ../crayon_settings_wp.class.php:311
248
  #, fuzzy
249
  msgid "Tag Editor"
250
- msgstr "Tema Editore"
251
 
252
  # @ crayon-syntax-highlighter
253
- #: ../crayon_settings_wp.class.php:312
254
  msgid "Misc"
255
  msgstr "Varie"
256
 
257
  # @ crayon-syntax-highlighter
258
- #: ../crayon_settings_wp.class.php:315
259
  msgid "Debug"
260
  msgstr "Debug"
261
 
262
  # @ crayon-syntax-highlighter
263
- #: ../crayon_settings_wp.class.php:316
264
  msgid "Errors"
265
  msgstr "Errori"
266
 
267
  # @ crayon-syntax-highlighter
268
- #: ../crayon_settings_wp.class.php:317
269
  msgid "Log"
270
  msgstr "Log"
271
 
272
  # @ crayon-syntax-highlighter
273
- #: ../crayon_settings_wp.class.php:320
274
  msgid "About"
275
- msgstr "Circa"
276
 
277
  # @ crayon-syntax-highlighter
278
- #: ../crayon_settings_wp.class.php:503
279
  msgid "Crayon Help"
280
  msgstr "Crayon Aiuto"
281
 
282
  # @ crayon-syntax-highlighter
283
- #: ../crayon_settings_wp.class.php:518
284
  msgid "Height"
285
  msgstr "Altezza"
286
 
287
  # @ crayon-syntax-highlighter
288
- #: ../crayon_settings_wp.class.php:524
289
  msgid "Width"
290
  msgstr "Larghezza"
291
 
292
  # @ crayon-syntax-highlighter
293
- #: ../crayon_settings_wp.class.php:530
294
  msgid "Top Margin"
295
  msgstr "Margine superiore"
296
 
297
  # @ crayon-syntax-highlighter
298
- #: ../crayon_settings_wp.class.php:531
299
  msgid "Bottom Margin"
300
- msgstr "Basso margine"
301
 
302
  # @ crayon-syntax-highlighter
303
- #: ../crayon_settings_wp.class.php:532
304
  #: ../crayon_settings_wp.class.php:537
 
305
  msgid "Left Margin"
306
  msgstr "Margine sinistro"
307
 
308
  # @ crayon-syntax-highlighter
309
- #: ../crayon_settings_wp.class.php:533
310
- #: ../crayon_settings_wp.class.php:537
311
  msgid "Right Margin"
312
  msgstr "Margine destro"
313
 
314
  # @ crayon-syntax-highlighter
315
- #: ../crayon_settings_wp.class.php:543
316
  msgid "Horizontal Alignment"
317
  msgstr "Allineamento orizzontale"
318
 
319
  # @ crayon-syntax-highlighter
320
- #: ../crayon_settings_wp.class.php:546
321
  msgid "Allow floating elements to surround Crayon"
322
- msgstr "Consentire agli elementi flottanti per circondare Crayon"
323
 
324
  # @ crayon-syntax-highlighter
325
- #: ../crayon_settings_wp.class.php:548
326
  msgid "Inline Margin"
327
  msgstr "Margine Inline"
328
 
329
  # @ crayon-syntax-highlighter
330
- #: ../crayon_settings_wp.class.php:556
331
  msgid "Display the Toolbar"
332
  msgstr "Visualizzare la barra degli strumenti"
333
 
334
  # @ crayon-syntax-highlighter
335
- #: ../crayon_settings_wp.class.php:559
336
  msgid "Overlay the toolbar on code rather than push it down when possible"
337
- msgstr "Sovrapposizione della barra degli strumenti sul codice, piuttosto che spingere verso il basso quando è possibile"
338
 
339
  # @ crayon-syntax-highlighter
340
- #: ../crayon_settings_wp.class.php:560
341
  msgid "Toggle the toolbar on single click when it is overlayed"
342
  msgstr "Attivare o disattivare la barra degli strumenti sul singolo click quando è sovrapposto"
343
 
344
  # @ crayon-syntax-highlighter
345
- #: ../crayon_settings_wp.class.php:561
346
  msgid "Delay hiding the toolbar on MouseOut"
347
- msgstr "Ritardo nascondere la barra degli strumenti su MouseOut"
348
 
349
  # @ crayon-syntax-highlighter
350
- #: ../crayon_settings_wp.class.php:563
351
  msgid "Display the title when provided"
352
- msgstr "Visualizzare il titolo, ove previsto"
353
 
354
  # @ crayon-syntax-highlighter
355
- #: ../crayon_settings_wp.class.php:564
356
  msgid "Display the language"
357
- msgstr "Visualizzare la lingua"
358
 
359
  # @ crayon-syntax-highlighter
360
- #: ../crayon_settings_wp.class.php:571
361
  msgid "Display striped code lines"
362
  msgstr "Visualizzare le linee del codice a strisce"
363
 
364
  # @ crayon-syntax-highlighter
365
- #: ../crayon_settings_wp.class.php:572
366
  msgid "Enable line marking for important lines"
367
- msgstr "Abilita linea di marcatura per linee importanti"
368
 
369
  # @ crayon-syntax-highlighter
370
- #: ../crayon_settings_wp.class.php:573
371
  msgid "Display line numbers by default"
372
  msgstr "Visualizzare i numeri di linea di default"
373
 
374
  # @ crayon-syntax-highlighter
375
- #: ../crayon_settings_wp.class.php:574
376
  msgid "Enable line number toggling"
377
- msgstr "Abilita numero di commutazione linea"
378
 
379
  # @ crayon-syntax-highlighter
380
- #: ../crayon_settings_wp.class.php:575
381
  msgid "Start line numbers from"
382
  msgstr "Inizio numeri di riga da"
383
 
384
  # @ crayon-syntax-highlighter
385
- #: ../crayon_settings_wp.class.php:585
386
  msgid "When no language is provided, use the fallback"
387
- msgstr "Quando non è prevista la lingua, utilizzare il fallback"
388
 
389
  # @ crayon-syntax-highlighter
390
- #: ../crayon_settings_wp.class.php:591
391
  #, fuzzy, php-format
392
  msgid "%d language has been detected."
393
- msgstr "%d lingua è stata rilevata."
394
 
395
  # @ crayon-syntax-highlighter
396
- #: ../crayon_settings_wp.class.php:592
397
  msgid "Parsing was successful"
398
  msgstr "L'analisi ha avuto successo"
399
 
400
  # @ crayon-syntax-highlighter
401
- #: ../crayon_settings_wp.class.php:592
402
  msgid "Parsing was unsuccessful"
403
  msgstr "L'analisi non ha avuto successo"
404
 
405
  # @ crayon-syntax-highlighter
406
- #: ../crayon_settings_wp.class.php:598
407
  #, php-format
408
  msgid "The selected language with id %s could not be loaded"
409
- msgstr "La lingua selezionata con id %s non può essere caricato"
410
 
411
  # @ crayon-syntax-highlighter
412
- #: ../crayon_settings_wp.class.php:602
413
  msgid "Show Languages"
414
- msgstr "Mostra Lingue"
415
 
416
  # @ crayon-syntax-highlighter
417
- #: ../crayon_settings_wp.class.php:621
 
418
  msgid "Loading..."
419
  msgstr "Caricamento..."
420
 
 
 
 
 
421
  # @ crayon-syntax-highlighter
422
- #: ../crayon_settings_wp.class.php:621
423
- #: ../crayon_settings_wp.class.php:804
424
- msgid "Theme Editor"
425
- msgstr "Tema Editore"
426
 
427
  # @ crayon-syntax-highlighter
428
- #: ../crayon_settings_wp.class.php:626
429
  #, php-format
430
  msgid "Change the %1$sfallback language%2$s to change the sample code. Lines 5-7 are marked."
431
- msgstr "Cambiare la %1$slingua di fallback%2$s di cambiare il codice di esempio. Le righe 5-7 sono contrassegnati."
432
 
433
  # @ crayon-syntax-highlighter
434
- #: ../crayon_settings_wp.class.php:630
435
  msgid "Enable Live Preview"
436
  msgstr "Attiva anteprima dal vivo"
437
 
438
  # @ crayon-syntax-highlighter
439
- #: ../crayon_settings_wp.class.php:632
440
  msgid "Enqueue themes in the header (more efficient)."
441
- msgstr "Accoda temi nell'intestazione (bassi consumi)."
442
 
443
- #: ../crayon_settings_wp.class.php:632
444
- #: ../crayon_settings_wp.class.php:658
445
- #: ../crayon_settings_wp.class.php:683
446
- #: ../crayon_settings_wp.class.php:690
447
  #: ../crayon_settings_wp.class.php:691
448
- #: ../crayon_settings_wp.class.php:692
449
- #: ../crayon_settings_wp.class.php:693
450
- #: ../crayon_settings_wp.class.php:694
451
- #: ../crayon_settings_wp.class.php:695
452
- #: ../crayon_settings_wp.class.php:709
453
- #: ../crayon_settings_wp.class.php:716
454
  #: ../crayon_settings_wp.class.php:717
 
 
455
  msgid "?"
456
  msgstr ""
457
 
458
  # @ crayon-syntax-highlighter
459
- #: ../crayon_settings_wp.class.php:635
460
  #, php-format
461
  msgid "The selected theme with id %s could not be loaded"
462
- msgstr "La tema selezionata con id %s non può essere caricato"
463
 
464
  # @ crayon-syntax-highlighter
465
- #: ../crayon_settings_wp.class.php:647
466
  msgid "Custom Font Size"
467
- msgstr "Dimensione del carattere personalizzati"
468
 
469
  # @ crayon-syntax-highlighter
470
- #: ../crayon_settings_wp.class.php:652
471
  #, php-format
472
  msgid "The selected font with id %s could not be loaded"
473
- msgstr "La font selezionata con id %s non può essere caricato"
474
 
475
  # @ crayon-syntax-highlighter
476
- #: ../crayon_settings_wp.class.php:658
477
  msgid "Enqueue fonts in the header (more efficient)."
478
- msgstr "Accoda i caratteri nell'intestazione (bassi consumi)."
479
 
480
  # @ crayon-syntax-highlighter
481
- #: ../crayon_settings_wp.class.php:663
482
  msgid "Enable plain code view and display"
483
- msgstr "Attiva la visualizzazione del semplice codice e la visualizzazione"
484
 
485
  # @ crayon-syntax-highlighter
486
- #: ../crayon_settings_wp.class.php:666
487
  msgid "Enable plain code toggling"
488
- msgstr "Abilita commutazione del semplice codice"
489
 
490
  # @ crayon-syntax-highlighter
491
- #: ../crayon_settings_wp.class.php:667
492
  msgid "Show the plain code by default"
493
- msgstr "Mostrare il codice normale per impostazione predefinita"
494
 
495
  # @ crayon-syntax-highlighter
496
- #: ../crayon_settings_wp.class.php:668
497
  msgid "Enable code copy/paste"
498
- msgstr "Abilita copiare il codice/incolla"
499
 
500
  # @ crayon-syntax-highlighter
501
- #: ../crayon_settings_wp.class.php:670
502
  msgid "Enable opening code in a window"
503
- msgstr "Abilita il codice di apertura in una finestra"
504
 
505
  # @ crayon-syntax-highlighter
506
- #: ../crayon_settings_wp.class.php:671
507
  msgid "Always display scrollbars"
508
  msgstr "Mostra sempre barre di scorrimento"
509
 
510
  # @ crayon-syntax-highlighter
511
- #: ../crayon_settings_wp.class.php:672
512
  msgid "Tab size in spaces"
513
  msgstr "Dimensione tabulazione in spazi"
514
 
515
- #: ../crayon_settings_wp.class.php:677
516
  msgid "Decode HTML entities in code"
517
  msgstr "Decodifica entità HTML in codice"
518
 
519
- #: ../crayon_settings_wp.class.php:679
520
  msgid "Decode HTML entities in attributes"
521
  msgstr "Decodifica entità HTML negli attributi"
522
 
523
  # @ crayon-syntax-highlighter
524
- #: ../crayon_settings_wp.class.php:681
525
  msgid "Remove whitespace surrounding the shortcode content"
526
- msgstr "Rimuovere gli spazi bianchi che circondano il contenuto shortcode"
527
 
528
  # @ crayon-syntax-highlighter
529
- #: ../crayon_settings_wp.class.php:683
530
  msgid "Allow Mixed Language Highlighting with delimiters and tags."
531
- msgstr "Lasciare Evidenziando Lingua mista con delimitatori e tag."
532
 
533
  # @ crayon-syntax-highlighter
534
- #: ../crayon_settings_wp.class.php:685
535
  msgid "Show Mixed Language Icon (+)"
536
- msgstr "Mostra icona misto di lingua (+)"
537
 
538
  # @ crayon-syntax-highlighter
539
- #: ../crayon_settings_wp.class.php:690
540
  msgid "Capture Mini Tags like [php][/php] as Crayons."
541
- msgstr "Cattura Tags come Mini [php][/php] come Crayons."
542
 
543
  # @ crayon-syntax-highlighter
544
- #: ../crayon_settings_wp.class.php:691
545
  msgid "Capture Inline Tags like {php}{/php} inside sentences."
546
- msgstr "Cattura Tags Inline come {php} {/php} all'interno di frasi."
547
 
548
  # @ crayon-syntax-highlighter
549
- #: ../crayon_settings_wp.class.php:692
550
  msgid "Wrap Inline Tags"
551
- msgstr "Avvolgere In Linea Tag"
552
 
553
  # @ crayon-syntax-highlighter
554
- #: ../crayon_settings_wp.class.php:693
555
  msgid "Capture `backquotes` as &lt;code&gt;"
556
- msgstr "Cattura `apici inversi` come &lt;code&gt;"
557
 
558
  # @ crayon-syntax-highlighter
559
- #: ../crayon_settings_wp.class.php:694
560
  msgid "Capture &lt;pre&gt; tags as Crayons"
561
- msgstr "Cattura tag &lt;pre&gt; come Crayons"
562
 
563
  # @ crayon-syntax-highlighter
564
- #: ../crayon_settings_wp.class.php:695
565
  msgid "Enable [plain][/plain] tag."
566
  msgstr "Abilita tag [plain][/plain]."
567
 
568
  # @ crayon-syntax-highlighter
569
- #: ../crayon_settings_wp.class.php:700
570
  msgid "When loading local files and a relative path is given for the URL, use the absolute path"
571
- msgstr "Quando si caricano i file locali e un percorso relativo è dato per l'URL, utilizzare il percorso assoluto"
572
 
573
  # @ crayon-syntax-highlighter
574
- #: ../crayon_settings_wp.class.php:703
575
  msgid "Followed by your relative URL."
576
- msgstr "Seguito dal relativo URL."
577
 
578
- #: ../crayon_settings_wp.class.php:707
579
  #, php-format
580
  msgid "Use %s to separate setting names from values in the &lt;pre&gt; class attribute"
581
- msgstr "Utilizzare %s ai nomi di taratura distinte dai valori nell'attributo %s classe"
582
 
583
  # @ crayon-syntax-highlighter
584
- #: ../crayon_settings_wp.class.php:713
585
  msgid "Clear the cache used to store remote code requests"
586
  msgstr "Svuotare la cache utilizzata per memorizzare le richieste di codice remoto"
587
 
588
  # @ crayon-syntax-highlighter
589
- #: ../crayon_settings_wp.class.php:715
590
  msgid "Clear Now"
591
  msgstr "Svuota adesso"
592
 
593
  # @ crayon-syntax-highlighter
594
- #: ../crayon_settings_wp.class.php:716
595
  msgid "Attempt to load Crayon's CSS and JavaScript only when needed"
596
- msgstr "Tentativo di caricare Crayon CSS e JavaScript solo quando necessario"
597
 
598
  # @ crayon-syntax-highlighter
599
- #: ../crayon_settings_wp.class.php:717
600
  msgid "Disable enqueuing for page templates that may contain The Loop."
601
- msgstr "Disabilitare Accodamento per i modelli di pagina che può contenere The Loop."
602
 
603
  # @ crayon-syntax-highlighter
604
- #: ../crayon_settings_wp.class.php:718
605
  msgid "Allow Crayons inside comments"
606
  msgstr "Consentire Crayons all'interno di commenti"
607
 
608
- #: ../crayon_settings_wp.class.php:719
609
  msgid "Remove Crayons from excerpts"
610
  msgstr "Rimuovere Crayons da estratti"
611
 
612
  # @ crayon-syntax-highlighter
613
- #: ../crayon_settings_wp.class.php:720
614
  msgid "Load Crayons only from the main Wordpress query"
615
- msgstr "Pastelli carico solo dalla query principale Wordpress"
616
 
617
  # @ crayon-syntax-highlighter
618
- #: ../crayon_settings_wp.class.php:721
619
  msgid "Disable mouse gestures for touchscreen devices (eg. MouseOver)"
620
  msgstr "Disabilitare i gesti del mouse per i dispositivi touchscreen (es. MouseOver)"
621
 
622
  # @ crayon-syntax-highlighter
623
- #: ../crayon_settings_wp.class.php:722
624
  msgid "Disable animations"
625
  msgstr "Disattivare le animazioni"
626
 
627
  # @ crayon-syntax-highlighter
628
- #: ../crayon_settings_wp.class.php:723
629
  msgid "Disable runtime stats"
630
  msgstr "Disabilitare runtime stats"
631
 
632
  # @ crayon-syntax-highlighter
633
- #: ../crayon_settings_wp.class.php:729
634
  msgid "Log errors for individual Crayons"
635
- msgstr "Errori nel registro di Crayons singoli"
636
 
637
  # @ crayon-syntax-highlighter
638
- #: ../crayon_settings_wp.class.php:730
639
  msgid "Log system-wide errors"
640
- msgstr "Log di sistema a livello di errori"
641
 
642
  # @ crayon-syntax-highlighter
643
- #: ../crayon_settings_wp.class.php:731
644
  msgid "Display custom message for errors"
645
- msgstr "Display messaggio personalizzato per gli errori"
646
 
647
  # @ crayon-syntax-highlighter
648
- #: ../crayon_settings_wp.class.php:743
649
  msgid "Show Log"
650
- msgstr "Mostra registro"
651
 
652
  # @ crayon-syntax-highlighter
653
- #: ../crayon_settings_wp.class.php:743
654
  msgid "Hide Log"
655
- msgstr "Nascondi Log"
656
 
657
  # @ crayon-syntax-highlighter
658
- #: ../crayon_settings_wp.class.php:745
659
  msgid "Clear Log"
660
- msgstr "Cancella registro"
661
 
662
  # @ crayon-syntax-highlighter
663
- #: ../crayon_settings_wp.class.php:746
664
  msgid "Email Admin"
665
  msgstr "E-mail Admin"
666
 
667
  # @ crayon-syntax-highlighter
668
- #: ../crayon_settings_wp.class.php:748
669
  msgid "Email Developer"
670
  msgstr "Email Developer"
671
 
672
  # @ crayon-syntax-highlighter
673
- #: ../crayon_settings_wp.class.php:750
674
  msgid "The log is currently empty."
675
- msgstr "Il registro è vuoto."
676
 
677
  # @ crayon-syntax-highlighter
678
- #: ../crayon_settings_wp.class.php:752
679
  msgid "The log file exists and is writable."
680
- msgstr "Il file di registro esiste ed è scrivibile."
681
 
682
  # @ crayon-syntax-highlighter
683
- #: ../crayon_settings_wp.class.php:752
684
  msgid "The log file exists and is not writable."
685
- msgstr "Il file di registro esiste e non è scrivibile."
686
 
687
  # @ crayon-syntax-highlighter
688
- #: ../crayon_settings_wp.class.php:754
689
  msgid "The log file does not exist and is not writable."
690
- msgstr "Il file di registro non esiste e non è scrivibile."
691
 
692
  # @ crayon-syntax-highlighter
693
- #: ../crayon_settings_wp.class.php:764
694
  msgid "Version"
695
  msgstr "Versione"
696
 
697
  # @ crayon-syntax-highlighter
698
- #: ../crayon_settings_wp.class.php:766
699
  msgid "Developer"
700
  msgstr "Sviluppatore"
701
 
702
  # @ crayon-syntax-highlighter
703
- #: ../crayon_settings_wp.class.php:767
704
  msgid "Translators"
705
  msgstr "Traduttori"
706
 
707
  # @ crayon-syntax-highlighter
708
- #: ../crayon_settings_wp.class.php:790
709
  msgid "The result of innumerable hours of hard work over many months. It's an ongoing project, keep me motivated!"
710
- msgstr "Il risultato di innumerevoli ore di duro lavoro per molti mesi. E 'un progetto in corso, tenermi motivato!"
711
 
712
  # @ crayon-syntax-highlighter
713
- #: ../crayon_settings_wp.class.php:806
 
 
 
 
 
714
  msgid "Donate"
715
  msgstr "Donare"
716
 
717
  # @ crayon-syntax-highlighter
718
- #: ../util/tag-editor/crayon_tag_editor_wp.class.php:57
719
  #, fuzzy
720
  msgid "Add Crayon Code"
721
- msgstr "Crayon Aiuto"
722
 
723
- #: ../util/tag-editor/crayon_tag_editor_wp.class.php:58
724
  msgid "Edit Crayon Code"
725
- msgstr "Crayon modifica del codice"
726
 
727
- #: ../util/tag-editor/crayon_tag_editor_wp.class.php:59
728
  msgid "Add"
729
- msgstr "Aggiungere"
730
 
731
- #: ../util/tag-editor/crayon_tag_editor_wp.class.php:60
732
  msgid "Save"
733
- msgstr "Salvare"
734
 
735
  # @ crayon-syntax-highlighter
736
- #: ../util/tag-editor/crayon_te_content.php:65
737
  #, fuzzy
738
  msgid "Title"
739
- msgstr "File"
740
 
741
- #: ../util/tag-editor/crayon_te_content.php:67
742
  msgid "A short description"
743
  msgstr "Una breve descrizione"
744
 
745
  # @ crayon-syntax-highlighter
746
- #: ../util/tag-editor/crayon_te_content.php:70
747
  #, fuzzy
748
  msgid "Inline"
749
- msgstr "Margine Inline"
750
 
751
  # @ crayon-syntax-highlighter
752
- #: ../util/tag-editor/crayon_te_content.php:75
753
  #, fuzzy
754
  msgid "Language"
755
- msgstr "Lingue"
756
 
757
- #: ../util/tag-editor/crayon_te_content.php:78
758
  msgid "Marked Lines"
759
  msgstr "Linee Marcate"
760
 
761
- #: ../util/tag-editor/crayon_te_content.php:79
762
  msgid "(e.g. 1,2,3-5)"
763
  msgstr "(ad esempio 1,2,3-5)"
764
 
765
  # @ crayon-syntax-highlighter
766
- #: ../util/tag-editor/crayon_te_content.php:82
767
  #, fuzzy
768
  msgid "Disable Highlighting"
769
- msgstr "Disattivare le animazioni"
770
 
771
  # @ crayon-syntax-highlighter
772
- #: ../util/tag-editor/crayon_te_content.php:87
773
  #, fuzzy
774
  msgid "Clear"
775
  msgstr "Svuota adesso"
776
 
777
- #: ../util/tag-editor/crayon_te_content.php:88
778
  msgid "Paste your code here, or type it in manually."
779
- msgstr "Incolla qui il tuo codice, oppure digitare manualmente."
780
 
781
- #: ../util/tag-editor/crayon_te_content.php:91
782
  msgid "URL"
783
- msgstr ""
784
 
785
- #: ../util/tag-editor/crayon_te_content.php:93
786
  msgid "Relative local path or absolute URL"
787
- msgstr "Relativo percorso locale o un URL assoluto"
788
 
789
- #: ../util/tag-editor/crayon_te_content.php:96
790
  msgid "If the URL fails to load, the code above will be shown instead. If no code exists, an error is shown."
791
  msgstr "Se l'URL non viene caricato, il codice di cui sopra sarà visualizzato. Se non esiste codice, viene visualizzato un errore."
792
 
793
- #: ../util/tag-editor/crayon_te_content.php:98
794
  #, php-format
795
  msgid "If a relative local path is given it will be appended to %s - which is defined in %sCrayon &gt; Settings &gt; Files%s."
796
- msgstr "Se un percorso relativo locale è dato verrà aggiunto %s - che è definita in %sCrayon &gt; Impostazioni &gt; Files%s."
797
 
798
- #: ../util/tag-editor/crayon_te_content.php:117
799
  msgid "Change the following settings to override their global values."
800
- msgstr "Modificare le seguenti impostazioni per sovrascrivere i valori globali."
801
 
802
- #: ../util/tag-editor/crayon_te_content.php:119
803
  msgid "Only changes (shown yellow) are applied."
804
  msgstr "Solo le modifiche (in grigio chiaro) vengono applicate."
805
 
806
- #: ../util/tag-editor/crayon_te_content.php:121
807
  #, php-format
808
  msgid "Future changes to the global settings under %sCrayon &gt; Settings%s won't affect overridden settings."
809
- msgstr "Le future modifiche alle impostazioni globali sotto %sCrayon &gt; Impostazioni%s non influisce sulle impostazioni sottoposte a override."
 
 
 
 
 
 
 
 
 
 
810
 
811
  # @ crayon-syntax-highlighter
812
- #: ../util/theme-editor/editor.php:16
813
  msgid "Back To Settings"
814
  msgstr "Torna in Impostazioni"
815
 
2
  msgstr ""
3
  "Project-Id-Version: crayon-syntax-highlighter\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-07-27 00:17+1000\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: \n"
8
  "Language-Team: \n"
20
  "X-Poedit-SearchPath-1: ..\n"
21
 
22
  # @ crayon-syntax-highlighter
23
+ #: ../crayon_formatter.class.php:269
24
  msgid "Toggle Plain Code"
25
+ msgstr "Mostra/nascondi codice sorgente"
26
 
27
  # @ crayon-syntax-highlighter
28
+ #: ../crayon_formatter.class.php:271
29
  #, php-format
30
  msgid "Press %s to Copy, %s to Paste"
31
+ msgstr "Premi %s per copiare, %s per incollare"
32
 
33
  # @ crayon-syntax-highlighter
34
+ #: ../crayon_formatter.class.php:271
35
  msgid "Copy Plain Code"
36
+ msgstr "Copia codice sorgente"
37
 
38
  # @ crayon-syntax-highlighter
39
+ #: ../crayon_formatter.class.php:273
40
  msgid "Open Code In New Window"
41
+ msgstr "Apri il codice in una nuova finestra"
42
 
43
  # @ crayon-syntax-highlighter
44
+ #: ../crayon_formatter.class.php:276
45
  msgid "Toggle Line Numbers"
46
+ msgstr "Mostra/nascondi numeri di riga"
47
 
48
  # @ crayon-syntax-highlighter
49
+ #: ../crayon_formatter.class.php:282
50
  msgid "Contains Mixed Languages"
51
+ msgstr "Contiene linguaggi misti"
52
 
53
  # @ crayon-syntax-highlighter
54
  #: ../crayon_settings.class.php:138
96
  # @ crayon-syntax-highlighter
97
  #: ../crayon_settings.class.php:152
98
  #: ../crayon_settings.class.php:156
99
+ #: ../crayon_settings_wp.class.php:546
100
+ #: ../crayon_settings_wp.class.php:555
101
+ #: ../crayon_settings_wp.class.php:657
102
  msgid "Pixels"
103
  msgstr "Pixels"
104
 
159
  # @ crayon-syntax-highlighter
160
  #: ../crayon_settings.class.php:189
161
  msgid "On Single Click"
162
+ msgstr "Su singolo click"
163
 
164
  # @ crayon-syntax-highlighter
165
  #: ../crayon_settings.class.php:189
166
  msgid "Disable Mouse Events"
167
+ msgstr "Disabilitare eventi del mouse"
168
 
169
  # @ crayon-syntax-highlighter
170
  #: ../crayon_settings.class.php:196
171
  msgid "An error has occurred. Please try again later."
172
+ msgstr "Si è verificato un errore. Riprova più tardi."
173
 
174
  # @ crayon-syntax-highlighter
175
  #: ../crayon_settings_wp.class.php:44
176
+ #: ../crayon_settings_wp.class.php:121
177
+ #: ../crayon_settings_wp.class.php:811
178
  msgid "Settings"
179
  msgstr "Impostazioni"
180
 
181
  # @ crayon-syntax-highlighter
182
+ #: ../crayon_settings_wp.class.php:102
183
  msgid "You do not have sufficient permissions to access this page."
184
  msgstr "Non si dispone di autorizzazioni sufficienti per accedere a questa pagina."
185
 
186
  # @ crayon-syntax-highlighter
187
+ #: ../crayon_settings_wp.class.php:133
188
  msgid "Save Changes"
189
  msgstr "Salva le modifiche"
190
 
191
  # @ crayon-syntax-highlighter
192
+ #: ../crayon_settings_wp.class.php:139
193
  msgid "Reset Settings"
194
  msgstr "Ripristina Impostazioni"
195
 
196
  # @ crayon-syntax-highlighter
197
+ #: ../crayon_settings_wp.class.php:306
198
  msgid "General"
199
  msgstr "General"
200
 
201
  # @ crayon-syntax-highlighter
202
+ #: ../crayon_settings_wp.class.php:307
203
  msgid "Theme"
204
  msgstr "Tema"
205
 
206
  # @ crayon-syntax-highlighter
207
+ #: ../crayon_settings_wp.class.php:308
208
  msgid "Font"
209
+ msgstr "Carattere"
210
 
211
  # @ crayon-syntax-highlighter
212
+ #: ../crayon_settings_wp.class.php:309
213
  msgid "Metrics"
214
  msgstr "Metrica"
215
 
216
  # @ crayon-syntax-highlighter
217
+ #: ../crayon_settings_wp.class.php:310
218
  msgid "Toolbar"
219
  msgstr "Toolbar"
220
 
221
  # @ crayon-syntax-highlighter
222
+ #: ../crayon_settings_wp.class.php:311
223
  msgid "Lines"
224
  msgstr "Linee"
225
 
226
  # @ crayon-syntax-highlighter
227
+ #: ../crayon_settings_wp.class.php:312
228
  msgid "Code"
229
  msgstr "Codice"
230
 
231
  # @ crayon-syntax-highlighter
232
+ #: ../crayon_settings_wp.class.php:313
233
  msgid "Tags"
234
  msgstr "Tags"
235
 
236
  # @ crayon-syntax-highlighter
237
+ #: ../crayon_settings_wp.class.php:314
238
  msgid "Languages"
239
  msgstr "Lingue"
240
 
241
  # @ crayon-syntax-highlighter
242
+ #: ../crayon_settings_wp.class.php:315
243
  msgid "Files"
244
  msgstr "File"
245
 
246
  # @ crayon-syntax-highlighter
247
+ #: ../crayon_settings_wp.class.php:316
248
  #, fuzzy
249
  msgid "Tag Editor"
250
+ msgstr "Editor di tag"
251
 
252
  # @ crayon-syntax-highlighter
253
+ #: ../crayon_settings_wp.class.php:317
254
  msgid "Misc"
255
  msgstr "Varie"
256
 
257
  # @ crayon-syntax-highlighter
258
+ #: ../crayon_settings_wp.class.php:320
259
  msgid "Debug"
260
  msgstr "Debug"
261
 
262
  # @ crayon-syntax-highlighter
263
+ #: ../crayon_settings_wp.class.php:321
264
  msgid "Errors"
265
  msgstr "Errori"
266
 
267
  # @ crayon-syntax-highlighter
268
+ #: ../crayon_settings_wp.class.php:322
269
  msgid "Log"
270
  msgstr "Log"
271
 
272
  # @ crayon-syntax-highlighter
273
+ #: ../crayon_settings_wp.class.php:325
274
  msgid "About"
275
+ msgstr "About"
276
 
277
  # @ crayon-syntax-highlighter
278
+ #: ../crayon_settings_wp.class.php:508
279
  msgid "Crayon Help"
280
  msgstr "Crayon Aiuto"
281
 
282
  # @ crayon-syntax-highlighter
283
+ #: ../crayon_settings_wp.class.php:523
284
  msgid "Height"
285
  msgstr "Altezza"
286
 
287
  # @ crayon-syntax-highlighter
288
+ #: ../crayon_settings_wp.class.php:529
289
  msgid "Width"
290
  msgstr "Larghezza"
291
 
292
  # @ crayon-syntax-highlighter
293
+ #: ../crayon_settings_wp.class.php:535
294
  msgid "Top Margin"
295
  msgstr "Margine superiore"
296
 
297
  # @ crayon-syntax-highlighter
298
+ #: ../crayon_settings_wp.class.php:536
299
  msgid "Bottom Margin"
300
+ msgstr "Margine inferiore"
301
 
302
  # @ crayon-syntax-highlighter
 
303
  #: ../crayon_settings_wp.class.php:537
304
+ #: ../crayon_settings_wp.class.php:542
305
  msgid "Left Margin"
306
  msgstr "Margine sinistro"
307
 
308
  # @ crayon-syntax-highlighter
309
+ #: ../crayon_settings_wp.class.php:538
310
+ #: ../crayon_settings_wp.class.php:542
311
  msgid "Right Margin"
312
  msgstr "Margine destro"
313
 
314
  # @ crayon-syntax-highlighter
315
+ #: ../crayon_settings_wp.class.php:548
316
  msgid "Horizontal Alignment"
317
  msgstr "Allineamento orizzontale"
318
 
319
  # @ crayon-syntax-highlighter
320
+ #: ../crayon_settings_wp.class.php:551
321
  msgid "Allow floating elements to surround Crayon"
322
+ msgstr "Consentire agli elementi flottanti di circondare Crayon"
323
 
324
  # @ crayon-syntax-highlighter
325
+ #: ../crayon_settings_wp.class.php:553
326
  msgid "Inline Margin"
327
  msgstr "Margine Inline"
328
 
329
  # @ crayon-syntax-highlighter
330
+ #: ../crayon_settings_wp.class.php:561
331
  msgid "Display the Toolbar"
332
  msgstr "Visualizzare la barra degli strumenti"
333
 
334
  # @ crayon-syntax-highlighter
335
+ #: ../crayon_settings_wp.class.php:564
336
  msgid "Overlay the toolbar on code rather than push it down when possible"
337
+ msgstr "Sovrapponi la barra degli strumenti sul codice piuttosto che spingerlo verso il basso, quando è possibile"
338
 
339
  # @ crayon-syntax-highlighter
340
+ #: ../crayon_settings_wp.class.php:565
341
  msgid "Toggle the toolbar on single click when it is overlayed"
342
  msgstr "Attivare o disattivare la barra degli strumenti sul singolo click quando è sovrapposto"
343
 
344
  # @ crayon-syntax-highlighter
345
+ #: ../crayon_settings_wp.class.php:566
346
  msgid "Delay hiding the toolbar on MouseOut"
347
+ msgstr "Ritarda la scomparsa della barra degli strumenti all'uscita del mouse"
348
 
349
  # @ crayon-syntax-highlighter
350
+ #: ../crayon_settings_wp.class.php:568
351
  msgid "Display the title when provided"
352
+ msgstr "Visualizzare il titolo ove previsto"
353
 
354
  # @ crayon-syntax-highlighter
355
+ #: ../crayon_settings_wp.class.php:569
356
  msgid "Display the language"
357
+ msgstr "Visualizzare il linguaggio"
358
 
359
  # @ crayon-syntax-highlighter
360
+ #: ../crayon_settings_wp.class.php:576
361
  msgid "Display striped code lines"
362
  msgstr "Visualizzare le linee del codice a strisce"
363
 
364
  # @ crayon-syntax-highlighter
365
+ #: ../crayon_settings_wp.class.php:577
366
  msgid "Enable line marking for important lines"
367
+ msgstr "Abilita marcatura per linee importanti"
368
 
369
  # @ crayon-syntax-highlighter
370
+ #: ../crayon_settings_wp.class.php:578
371
  msgid "Display line numbers by default"
372
  msgstr "Visualizzare i numeri di linea di default"
373
 
374
  # @ crayon-syntax-highlighter
375
+ #: ../crayon_settings_wp.class.php:579
376
  msgid "Enable line number toggling"
377
+ msgstr "Abilita commutazione numeri di linea"
378
 
379
  # @ crayon-syntax-highlighter
380
+ #: ../crayon_settings_wp.class.php:580
381
  msgid "Start line numbers from"
382
  msgstr "Inizio numeri di riga da"
383
 
384
  # @ crayon-syntax-highlighter
385
+ #: ../crayon_settings_wp.class.php:590
386
  msgid "When no language is provided, use the fallback"
387
+ msgstr "Quando non è previsto il linguaggio, utilizza quello predefinito"
388
 
389
  # @ crayon-syntax-highlighter
390
+ #: ../crayon_settings_wp.class.php:596
391
  #, fuzzy, php-format
392
  msgid "%d language has been detected."
393
+ msgstr "Il linguaggio %d è stato identificato."
394
 
395
  # @ crayon-syntax-highlighter
396
+ #: ../crayon_settings_wp.class.php:597
397
  msgid "Parsing was successful"
398
  msgstr "L'analisi ha avuto successo"
399
 
400
  # @ crayon-syntax-highlighter
401
+ #: ../crayon_settings_wp.class.php:597
402
  msgid "Parsing was unsuccessful"
403
  msgstr "L'analisi non ha avuto successo"
404
 
405
  # @ crayon-syntax-highlighter
406
+ #: ../crayon_settings_wp.class.php:603
407
  #, php-format
408
  msgid "The selected language with id %s could not be loaded"
409
+ msgstr "Il linguaggio selezionato con id %s non può essere caricato"
410
 
411
  # @ crayon-syntax-highlighter
412
+ #: ../crayon_settings_wp.class.php:607
413
  msgid "Show Languages"
414
+ msgstr "Mostra Linguaggi"
415
 
416
  # @ crayon-syntax-highlighter
417
+ #: ../crayon_settings_wp.class.php:628
418
+ #: ../crayon_settings_wp.class.php:629
419
  msgid "Loading..."
420
  msgstr "Caricamento..."
421
 
422
+ #: ../crayon_settings_wp.class.php:628
423
+ msgid "Edit"
424
+ msgstr ""
425
+
426
  # @ crayon-syntax-highlighter
427
+ #: ../crayon_settings_wp.class.php:629
428
+ #, fuzzy
429
+ msgid "Create"
430
+ msgstr "Centro"
431
 
432
  # @ crayon-syntax-highlighter
433
+ #: ../crayon_settings_wp.class.php:634
434
  #, php-format
435
  msgid "Change the %1$sfallback language%2$s to change the sample code. Lines 5-7 are marked."
436
+ msgstr "Cambiare il %1$slinguaggio predefinito%2$s per cambiare il codice di esempio. Le righe 5-7 sono contrassegnate."
437
 
438
  # @ crayon-syntax-highlighter
439
+ #: ../crayon_settings_wp.class.php:638
440
  msgid "Enable Live Preview"
441
  msgstr "Attiva anteprima dal vivo"
442
 
443
  # @ crayon-syntax-highlighter
444
+ #: ../crayon_settings_wp.class.php:640
445
  msgid "Enqueue themes in the header (more efficient)."
446
+ msgstr "Accoda temi nell'intestazione (più efficiente)."
447
 
448
+ #: ../crayon_settings_wp.class.php:640
449
+ #: ../crayon_settings_wp.class.php:666
 
 
450
  #: ../crayon_settings_wp.class.php:691
451
+ #: ../crayon_settings_wp.class.php:698
452
+ #: ../crayon_settings_wp.class.php:699
453
+ #: ../crayon_settings_wp.class.php:700
454
+ #: ../crayon_settings_wp.class.php:701
455
+ #: ../crayon_settings_wp.class.php:702
456
+ #: ../crayon_settings_wp.class.php:703
457
  #: ../crayon_settings_wp.class.php:717
458
+ #: ../crayon_settings_wp.class.php:724
459
+ #: ../crayon_settings_wp.class.php:725
460
  msgid "?"
461
  msgstr ""
462
 
463
  # @ crayon-syntax-highlighter
464
+ #: ../crayon_settings_wp.class.php:643
465
  #, php-format
466
  msgid "The selected theme with id %s could not be loaded"
467
+ msgstr "Il tema selezionato con id %s non può essere caricato"
468
 
469
  # @ crayon-syntax-highlighter
470
+ #: ../crayon_settings_wp.class.php:655
471
  msgid "Custom Font Size"
472
+ msgstr "Dimensione del carattere personalizzata"
473
 
474
  # @ crayon-syntax-highlighter
475
+ #: ../crayon_settings_wp.class.php:660
476
  #, php-format
477
  msgid "The selected font with id %s could not be loaded"
478
+ msgstr "Il carattere selezionato con id %s non può essere caricato"
479
 
480
  # @ crayon-syntax-highlighter
481
+ #: ../crayon_settings_wp.class.php:666
482
  msgid "Enqueue fonts in the header (more efficient)."
483
+ msgstr "Accoda i caratteri nell'intestazione (più efficiente)."
484
 
485
  # @ crayon-syntax-highlighter
486
+ #: ../crayon_settings_wp.class.php:671
487
  msgid "Enable plain code view and display"
488
+ msgstr "Attiva la visualizzazione del codice sorgente"
489
 
490
  # @ crayon-syntax-highlighter
491
+ #: ../crayon_settings_wp.class.php:674
492
  msgid "Enable plain code toggling"
493
+ msgstr "Abilita commutazione del codice sorgente"
494
 
495
  # @ crayon-syntax-highlighter
496
+ #: ../crayon_settings_wp.class.php:675
497
  msgid "Show the plain code by default"
498
+ msgstr "Mostrare il codice sorgente per impostazione predefinita"
499
 
500
  # @ crayon-syntax-highlighter
501
+ #: ../crayon_settings_wp.class.php:676
502
  msgid "Enable code copy/paste"
503
+ msgstr "Abilita copia/incolla del codice"
504
 
505
  # @ crayon-syntax-highlighter
506
+ #: ../crayon_settings_wp.class.php:678
507
  msgid "Enable opening code in a window"
508
+ msgstr "Abilita l'apertura del codice in una finestra"
509
 
510
  # @ crayon-syntax-highlighter
511
+ #: ../crayon_settings_wp.class.php:679
512
  msgid "Always display scrollbars"
513
  msgstr "Mostra sempre barre di scorrimento"
514
 
515
  # @ crayon-syntax-highlighter
516
+ #: ../crayon_settings_wp.class.php:680
517
  msgid "Tab size in spaces"
518
  msgstr "Dimensione tabulazione in spazi"
519
 
520
+ #: ../crayon_settings_wp.class.php:685
521
  msgid "Decode HTML entities in code"
522
  msgstr "Decodifica entità HTML in codice"
523
 
524
+ #: ../crayon_settings_wp.class.php:687
525
  msgid "Decode HTML entities in attributes"
526
  msgstr "Decodifica entità HTML negli attributi"
527
 
528
  # @ crayon-syntax-highlighter
529
+ #: ../crayon_settings_wp.class.php:689
530
  msgid "Remove whitespace surrounding the shortcode content"
531
+ msgstr "Rimuovere gli spazi bianchi che circondano il contenuto degli shortcode"
532
 
533
  # @ crayon-syntax-highlighter
534
+ #: ../crayon_settings_wp.class.php:691
535
  msgid "Allow Mixed Language Highlighting with delimiters and tags."
536
+ msgstr "Consenti linguaggio misto con delimitatori e tag."
537
 
538
  # @ crayon-syntax-highlighter
539
+ #: ../crayon_settings_wp.class.php:693
540
  msgid "Show Mixed Language Icon (+)"
541
+ msgstr "Mostra icona Linguaggio Misto (+)"
542
 
543
  # @ crayon-syntax-highlighter
544
+ #: ../crayon_settings_wp.class.php:698
545
  msgid "Capture Mini Tags like [php][/php] as Crayons."
546
+ msgstr "Identifica Mini Tags tipo [php][/php] come Crayons."
547
 
548
  # @ crayon-syntax-highlighter
549
+ #: ../crayon_settings_wp.class.php:699
550
  msgid "Capture Inline Tags like {php}{/php} inside sentences."
551
+ msgstr "Identifica Inline Tags come {php {/php} all'interno di frasi."
552
 
553
  # @ crayon-syntax-highlighter
554
+ #: ../crayon_settings_wp.class.php:700
555
  msgid "Wrap Inline Tags"
556
+ msgstr "Manda a capo Tag inline"
557
 
558
  # @ crayon-syntax-highlighter
559
+ #: ../crayon_settings_wp.class.php:701
560
  msgid "Capture `backquotes` as &lt;code&gt;"
561
+ msgstr "Identifica `apici inversi` come &lt;code&gt;"
562
 
563
  # @ crayon-syntax-highlighter
564
+ #: ../crayon_settings_wp.class.php:702
565
  msgid "Capture &lt;pre&gt; tags as Crayons"
566
+ msgstr "Identifica tag &lt;pre&gt; come Crayons"
567
 
568
  # @ crayon-syntax-highlighter
569
+ #: ../crayon_settings_wp.class.php:703
570
  msgid "Enable [plain][/plain] tag."
571
  msgstr "Abilita tag [plain][/plain]."
572
 
573
  # @ crayon-syntax-highlighter
574
+ #: ../crayon_settings_wp.class.php:708
575
  msgid "When loading local files and a relative path is given for the URL, use the absolute path"
576
+ msgstr "Quando si caricano i file locali e un percorso relativo è fornito per l'URL, utilizzare il percorso assoluto"
577
 
578
  # @ crayon-syntax-highlighter
579
+ #: ../crayon_settings_wp.class.php:711
580
  msgid "Followed by your relative URL."
581
+ msgstr "Seguito dal tuo URL relativo."
582
 
583
+ #: ../crayon_settings_wp.class.php:715
584
  #, php-format
585
  msgid "Use %s to separate setting names from values in the &lt;pre&gt; class attribute"
586
+ msgstr "Utilizzare %s per separare nomi di impostazioni dai valori nell'attributo class di &lt;pre&gt"
587
 
588
  # @ crayon-syntax-highlighter
589
+ #: ../crayon_settings_wp.class.php:721
590
  msgid "Clear the cache used to store remote code requests"
591
  msgstr "Svuotare la cache utilizzata per memorizzare le richieste di codice remoto"
592
 
593
  # @ crayon-syntax-highlighter
594
+ #: ../crayon_settings_wp.class.php:723
595
  msgid "Clear Now"
596
  msgstr "Svuota adesso"
597
 
598
  # @ crayon-syntax-highlighter
599
+ #: ../crayon_settings_wp.class.php:724
600
  msgid "Attempt to load Crayon's CSS and JavaScript only when needed"
601
+ msgstr "Tenta di caricare Crayon CSS e JavaScript solo quando necessario"
602
 
603
  # @ crayon-syntax-highlighter
604
+ #: ../crayon_settings_wp.class.php:725
605
  msgid "Disable enqueuing for page templates that may contain The Loop."
606
+ msgstr "Disabilitare Accodamento per i modelli di pagina che potrebbero contenere loop."
607
 
608
  # @ crayon-syntax-highlighter
609
+ #: ../crayon_settings_wp.class.php:726
610
  msgid "Allow Crayons inside comments"
611
  msgstr "Consentire Crayons all'interno di commenti"
612
 
613
+ #: ../crayon_settings_wp.class.php:727
614
  msgid "Remove Crayons from excerpts"
615
  msgstr "Rimuovere Crayons da estratti"
616
 
617
  # @ crayon-syntax-highlighter
618
+ #: ../crayon_settings_wp.class.php:728
619
  msgid "Load Crayons only from the main Wordpress query"
620
+ msgstr "Carica Crayons solo dalla query principale Wordpress"
621
 
622
  # @ crayon-syntax-highlighter
623
+ #: ../crayon_settings_wp.class.php:729
624
  msgid "Disable mouse gestures for touchscreen devices (eg. MouseOver)"
625
  msgstr "Disabilitare i gesti del mouse per i dispositivi touchscreen (es. MouseOver)"
626
 
627
  # @ crayon-syntax-highlighter
628
+ #: ../crayon_settings_wp.class.php:730
629
  msgid "Disable animations"
630
  msgstr "Disattivare le animazioni"
631
 
632
  # @ crayon-syntax-highlighter
633
+ #: ../crayon_settings_wp.class.php:731
634
  msgid "Disable runtime stats"
635
  msgstr "Disabilitare runtime stats"
636
 
637
  # @ crayon-syntax-highlighter
638
+ #: ../crayon_settings_wp.class.php:737
639
  msgid "Log errors for individual Crayons"
640
+ msgstr "Registra errori di Crayons singoli"
641
 
642
  # @ crayon-syntax-highlighter
643
+ #: ../crayon_settings_wp.class.php:738
644
  msgid "Log system-wide errors"
645
+ msgstr "Registra errori a livello di sistema"
646
 
647
  # @ crayon-syntax-highlighter
648
+ #: ../crayon_settings_wp.class.php:739
649
  msgid "Display custom message for errors"
650
+ msgstr "Mostra messaggi personalizzati per gli errori"
651
 
652
  # @ crayon-syntax-highlighter
653
+ #: ../crayon_settings_wp.class.php:751
654
  msgid "Show Log"
655
+ msgstr "Mostra log"
656
 
657
  # @ crayon-syntax-highlighter
658
+ #: ../crayon_settings_wp.class.php:751
659
  msgid "Hide Log"
660
+ msgstr "Nascondi log"
661
 
662
  # @ crayon-syntax-highlighter
663
+ #: ../crayon_settings_wp.class.php:753
664
  msgid "Clear Log"
665
+ msgstr "Cancella log"
666
 
667
  # @ crayon-syntax-highlighter
668
+ #: ../crayon_settings_wp.class.php:754
669
  msgid "Email Admin"
670
  msgstr "E-mail Admin"
671
 
672
  # @ crayon-syntax-highlighter
673
+ #: ../crayon_settings_wp.class.php:756
674
  msgid "Email Developer"
675
  msgstr "Email Developer"
676
 
677
  # @ crayon-syntax-highlighter
678
+ #: ../crayon_settings_wp.class.php:758
679
  msgid "The log is currently empty."
680
+ msgstr "Il log è vuoto."
681
 
682
  # @ crayon-syntax-highlighter
683
+ #: ../crayon_settings_wp.class.php:760
684
  msgid "The log file exists and is writable."
685
+ msgstr "Il file di log esiste ed è scrivibile."
686
 
687
  # @ crayon-syntax-highlighter
688
+ #: ../crayon_settings_wp.class.php:760
689
  msgid "The log file exists and is not writable."
690
+ msgstr "Il file di log esiste e non è scrivibile."
691
 
692
  # @ crayon-syntax-highlighter
693
+ #: ../crayon_settings_wp.class.php:762
694
  msgid "The log file does not exist and is not writable."
695
+ msgstr "Il file di log non esiste e non è scrivibile."
696
 
697
  # @ crayon-syntax-highlighter
698
+ #: ../crayon_settings_wp.class.php:772
699
  msgid "Version"
700
  msgstr "Versione"
701
 
702
  # @ crayon-syntax-highlighter
703
+ #: ../crayon_settings_wp.class.php:774
704
  msgid "Developer"
705
  msgstr "Sviluppatore"
706
 
707
  # @ crayon-syntax-highlighter
708
+ #: ../crayon_settings_wp.class.php:775
709
  msgid "Translators"
710
  msgstr "Traduttori"
711
 
712
  # @ crayon-syntax-highlighter
713
+ #: ../crayon_settings_wp.class.php:799
714
  msgid "The result of innumerable hours of hard work over many months. It's an ongoing project, keep me motivated!"
715
+ msgstr "Il risultato di innumerevoli ore di duro lavoro per molti mesi. E' un progetto in corso, tenetemi motivato!"
716
 
717
  # @ crayon-syntax-highlighter
718
+ #: ../crayon_settings_wp.class.php:813
719
+ msgid "Theme Editor"
720
+ msgstr "Editor di tema"
721
+
722
+ # @ crayon-syntax-highlighter
723
+ #: ../crayon_settings_wp.class.php:815
724
  msgid "Donate"
725
  msgstr "Donare"
726
 
727
  # @ crayon-syntax-highlighter
728
+ #: ../util/tag-editor/crayon_tag_editor_wp.class.php:58
729
  #, fuzzy
730
  msgid "Add Crayon Code"
731
+ msgstr "Aggiungi Codice Crayon"
732
 
733
+ #: ../util/tag-editor/crayon_tag_editor_wp.class.php:59
734
  msgid "Edit Crayon Code"
735
+ msgstr "Modifica codice Crayon"
736
 
737
+ #: ../util/tag-editor/crayon_tag_editor_wp.class.php:60
738
  msgid "Add"
739
+ msgstr "Aggiungi"
740
 
741
+ #: ../util/tag-editor/crayon_tag_editor_wp.class.php:61
742
  msgid "Save"
743
+ msgstr "Salva"
744
 
745
  # @ crayon-syntax-highlighter
746
+ #: ../util/tag-editor/crayon_te_content.php:64
747
  #, fuzzy
748
  msgid "Title"
749
+ msgstr "Titolo"
750
 
751
+ #: ../util/tag-editor/crayon_te_content.php:66
752
  msgid "A short description"
753
  msgstr "Una breve descrizione"
754
 
755
  # @ crayon-syntax-highlighter
756
+ #: ../util/tag-editor/crayon_te_content.php:69
757
  #, fuzzy
758
  msgid "Inline"
759
+ msgstr "Inline"
760
 
761
  # @ crayon-syntax-highlighter
762
+ #: ../util/tag-editor/crayon_te_content.php:74
763
  #, fuzzy
764
  msgid "Language"
765
+ msgstr "Linguaggio"
766
 
767
+ #: ../util/tag-editor/crayon_te_content.php:77
768
  msgid "Marked Lines"
769
  msgstr "Linee Marcate"
770
 
771
+ #: ../util/tag-editor/crayon_te_content.php:78
772
  msgid "(e.g. 1,2,3-5)"
773
  msgstr "(ad esempio 1,2,3-5)"
774
 
775
  # @ crayon-syntax-highlighter
776
+ #: ../util/tag-editor/crayon_te_content.php:81
777
  #, fuzzy
778
  msgid "Disable Highlighting"
779
+ msgstr "Disattiva Highlighting"
780
 
781
  # @ crayon-syntax-highlighter
782
+ #: ../util/tag-editor/crayon_te_content.php:86
783
  #, fuzzy
784
  msgid "Clear"
785
  msgstr "Svuota adesso"
786
 
787
+ #: ../util/tag-editor/crayon_te_content.php:87
788
  msgid "Paste your code here, or type it in manually."
789
+ msgstr "Incolla qui il tuo codice, oppure digitalo manualmente."
790
 
791
+ #: ../util/tag-editor/crayon_te_content.php:90
792
  msgid "URL"
793
+ msgstr "URL"
794
 
795
+ #: ../util/tag-editor/crayon_te_content.php:92
796
  msgid "Relative local path or absolute URL"
797
+ msgstr "Percorso locale relativo o URL assoluto"
798
 
799
+ #: ../util/tag-editor/crayon_te_content.php:95
800
  msgid "If the URL fails to load, the code above will be shown instead. If no code exists, an error is shown."
801
  msgstr "Se l'URL non viene caricato, il codice di cui sopra sarà visualizzato. Se non esiste codice, viene visualizzato un errore."
802
 
803
+ #: ../util/tag-editor/crayon_te_content.php:97
804
  #, php-format
805
  msgid "If a relative local path is given it will be appended to %s - which is defined in %sCrayon &gt; Settings &gt; Files%s."
806
+ msgstr "Se un percorso relativo locale è dato verrà aggiunto a %s - che è definita in %sCrayon &gt; Impostazioni &gt; Files%s."
807
 
808
+ #: ../util/tag-editor/crayon_te_content.php:116
809
  msgid "Change the following settings to override their global values."
810
+ msgstr "Modifica le seguenti impostazioni per sovrascrivere i valori globali."
811
 
812
+ #: ../util/tag-editor/crayon_te_content.php:118
813
  msgid "Only changes (shown yellow) are applied."
814
  msgstr "Solo le modifiche (in grigio chiaro) vengono applicate."
815
 
816
+ #: ../util/tag-editor/crayon_te_content.php:120
817
  #, php-format
818
  msgid "Future changes to the global settings under %sCrayon &gt; Settings%s won't affect overridden settings."
819
+ msgstr "Le future modifiche alle impostazioni globali sotto %sCrayon &gt; Impostazioni%s non influiranno sulle impostazioni sottoposte a override."
820
+
821
+ #: ../util/theme-editor/theme_editor_content.php:32
822
+ #, php-format
823
+ msgid "Editing \"%s\" Theme"
824
+ msgstr ""
825
+
826
+ #: ../util/theme-editor/theme_editor_content.php:34
827
+ #, php-format
828
+ msgid "Creating Theme From \"%s\""
829
+ msgstr ""
830
 
831
  # @ crayon-syntax-highlighter
832
+ #: ../util/theme-editor/theme_editor_content.php:39
833
  msgid "Back To Settings"
834
  msgstr "Torna in Impostazioni"
835
 
trans/crayon-syntax-highlighter-nl_NL.mo ADDED
Binary file
trans/crayon-syntax-highlighter-nl_NL.po ADDED
@@ -0,0 +1,867 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: crayon-syntax-highlighter\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2011-12-10 17:11+1000\n"
6
+ "PO-Revision-Date: 2012-07-05 15:38+0100\n"
7
+ "Last-Translator: Chilion <chilionsnoek@gmail.com>\n"
8
+ "Language-Team: \n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
+ "X-Poedit-Language: Dutch\n"
14
+ "X-Poedit-Country: NETHERLANDS\n"
15
+ "X-Poedit-SourceCharset: utf-8\n"
16
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
17
+ "X-Poedit-Basepath: .\n"
18
+ "X-Textdomain-Support: yes\n"
19
+ "X-Poedit-SearchPath-0: ..\n"
20
+
21
+ #@ crayon-syntax-highlighter
22
+ #: crayon_settings.class.php:150
23
+ #: crayon_settings.class.php:154
24
+ msgid "Max"
25
+ msgstr "Max"
26
+
27
+ #@ crayon-syntax-highlighter
28
+ #: crayon_settings.class.php:150
29
+ #: crayon_settings.class.php:154
30
+ msgid "Min"
31
+ msgstr "Min"
32
+
33
+ #@ crayon-syntax-highlighter
34
+ #: crayon_settings.class.php:150
35
+ #: crayon_settings.class.php:154
36
+ msgid "Static"
37
+ msgstr "Fix"
38
+
39
+ #@ crayon-syntax-highlighter
40
+ #: crayon_settings.class.php:152
41
+ #: crayon_settings.class.php:156
42
+ #: crayon_settings_wp.class.php:541
43
+ #: crayon_settings_wp.class.php:550
44
+ #: crayon_settings_wp.class.php:649
45
+ msgid "Pixels"
46
+ msgstr "Pixels"
47
+
48
+ #@ crayon-syntax-highlighter
49
+ #: crayon_settings.class.php:152
50
+ #: crayon_settings.class.php:156
51
+ msgid "Percent"
52
+ msgstr "Procent"
53
+
54
+ #@ crayon-syntax-highlighter
55
+ #: crayon_settings.class.php:165
56
+ msgid "None"
57
+ msgstr "Geen"
58
+
59
+ #@ crayon-syntax-highlighter
60
+ #: crayon_settings.class.php:165
61
+ msgid "Left"
62
+ msgstr "Links"
63
+
64
+ #@ crayon-syntax-highlighter
65
+ #: crayon_settings.class.php:165
66
+ msgid "Center"
67
+ msgstr "Midden"
68
+
69
+ #@ crayon-syntax-highlighter
70
+ #: crayon_settings.class.php:165
71
+ msgid "Right"
72
+ msgstr "Rechts"
73
+
74
+ #@ crayon-syntax-highlighter
75
+ #: crayon_settings.class.php:167
76
+ #: crayon_settings.class.php:189
77
+ msgid "On MouseOver"
78
+ msgstr "Bij MouseOver"
79
+
80
+ #@ crayon-syntax-highlighter
81
+ #: crayon_settings.class.php:167
82
+ #: crayon_settings.class.php:173
83
+ msgid "Always"
84
+ msgstr "Altijd"
85
+
86
+ #@ crayon-syntax-highlighter
87
+ #: crayon_settings.class.php:167
88
+ #: crayon_settings.class.php:173
89
+ msgid "Never"
90
+ msgstr "Nooit"
91
+
92
+ #@ crayon-syntax-highlighter
93
+ #: crayon_settings.class.php:173
94
+ msgid "When Found"
95
+ msgstr "Wanneer gevonden"
96
+
97
+ #@ crayon-syntax-highlighter
98
+ #: crayon_settings.class.php:189
99
+ msgid "On Double Click"
100
+ msgstr "Bij dubbelklik"
101
+
102
+ #@ crayon-syntax-highlighter
103
+ #: crayon_settings.class.php:189
104
+ msgid "On Single Click"
105
+ msgstr "Bij muisklik"
106
+
107
+ #@ crayon-syntax-highlighter
108
+ #: crayon_settings.class.php:196
109
+ msgid "An error has occurred. Please try again later."
110
+ msgstr "Er is een fout opgetreden, probeer het later opnieuw"
111
+
112
+ #@ crayon-syntax-highlighter
113
+ #: crayon_settings_wp.class.php:44
114
+ #: crayon_settings_wp.class.php:118
115
+ #: crayon_settings_wp.class.php:802
116
+ #: util/tag-editor/crayon_te_content.php:114
117
+ msgid "Settings"
118
+ msgstr "Instellingen"
119
+
120
+ #@ crayon-syntax-highlighter
121
+ #: crayon_settings_wp.class.php:99
122
+ msgid "You do not have sufficient permissions to access this page."
123
+ msgstr "Je hebt niet voldoende rechten om deze pagina te bekijken"
124
+
125
+ #@ crayon-syntax-highlighter
126
+ #: crayon_settings_wp.class.php:130
127
+ msgid "Save Changes"
128
+ msgstr "Sla veranderingen op"
129
+
130
+ #@ crayon-syntax-highlighter
131
+ #: crayon_settings_wp.class.php:136
132
+ msgid "Reset Settings"
133
+ msgstr "Instellingen resetten"
134
+
135
+ #@ crayon-syntax-highlighter
136
+ #: crayon_settings_wp.class.php:518
137
+ msgid "Height"
138
+ msgstr "Hoogte"
139
+
140
+ #@ crayon-syntax-highlighter
141
+ #: crayon_settings_wp.class.php:524
142
+ msgid "Width"
143
+ msgstr "Breedte"
144
+
145
+ #@ crayon-syntax-highlighter
146
+ #: crayon_settings_wp.class.php:530
147
+ msgid "Top Margin"
148
+ msgstr "Bovenste rand"
149
+
150
+ #@ crayon-syntax-highlighter
151
+ #: crayon_settings_wp.class.php:531
152
+ msgid "Bottom Margin"
153
+ msgstr "Onderste rand"
154
+
155
+ #@ crayon-syntax-highlighter
156
+ #: crayon_settings_wp.class.php:532
157
+ #: crayon_settings_wp.class.php:537
158
+ msgid "Left Margin"
159
+ msgstr "Linker Rand"
160
+
161
+ #@ crayon-syntax-highlighter
162
+ #: crayon_settings_wp.class.php:533
163
+ #: crayon_settings_wp.class.php:537
164
+ msgid "Right Margin"
165
+ msgstr "Rechter Rand"
166
+
167
+ #@ crayon-syntax-highlighter
168
+ #: crayon_settings_wp.class.php:543
169
+ msgid "Horizontal Alignment"
170
+ msgstr "Horizontale Uitlijning"
171
+
172
+ #@ crayon-syntax-highlighter
173
+ #: crayon_settings_wp.class.php:546
174
+ msgid "Allow floating elements to surround Crayon"
175
+ msgstr "Crayon door Floating Elementen omgeven"
176
+
177
+ #@ crayon-syntax-highlighter
178
+ #: crayon_settings_wp.class.php:556
179
+ msgid "Display the Toolbar"
180
+ msgstr "Laat de toolbar zien"
181
+
182
+ #@ crayon-syntax-highlighter
183
+ #: crayon_settings_wp.class.php:559
184
+ msgid "Overlay the toolbar on code rather than push it down when possible"
185
+ msgstr "Leg de toolbar over de code"
186
+
187
+ #@ crayon-syntax-highlighter
188
+ #: crayon_settings_wp.class.php:560
189
+ msgid "Toggle the toolbar on single click when it is overlayed"
190
+ msgstr "Toggle de toolbar met één klik"
191
+
192
+ #@ crayon-syntax-highlighter
193
+ #: crayon_settings_wp.class.php:561
194
+ msgid "Delay hiding the toolbar on MouseOut"
195
+ msgstr "Vertraag het verbergen van de toolbar bij MouseOut"
196
+
197
+ #@ crayon-syntax-highlighter
198
+ #: crayon_settings_wp.class.php:563
199
+ msgid "Display the title when provided"
200
+ msgstr "Laat de titel zien wanneer aanwezig"
201
+
202
+ #@ crayon-syntax-highlighter
203
+ #: crayon_settings_wp.class.php:564
204
+ msgid "Display the language"
205
+ msgstr "Laat de taal zien"
206
+
207
+ #@ crayon-syntax-highlighter
208
+ #: crayon_settings_wp.class.php:571
209
+ msgid "Display striped code lines"
210
+ msgstr "Laat gestripte code lijnen zien"
211
+
212
+ #@ crayon-syntax-highlighter
213
+ #: crayon_settings_wp.class.php:572
214
+ msgid "Enable line marking for important lines"
215
+ msgstr "Zet lijn markeren aan"
216
+
217
+ #@ crayon-syntax-highlighter
218
+ #: crayon_settings_wp.class.php:573
219
+ msgid "Display line numbers by default"
220
+ msgstr "Laat lijn nummers standaard zien"
221
+
222
+ #@ crayon-syntax-highlighter
223
+ #: crayon_settings_wp.class.php:574
224
+ msgid "Enable line number toggling"
225
+ msgstr "Zet lijn nummer toggling aan"
226
+
227
+ #@ crayon-syntax-highlighter
228
+ #: crayon_settings_wp.class.php:575
229
+ msgid "Start line numbers from"
230
+ msgstr "Start lijn nummers vanaf"
231
+
232
+ #@ crayon-syntax-highlighter
233
+ #: crayon_settings_wp.class.php:585
234
+ msgid "When no language is provided, use the fallback"
235
+ msgstr "Wanneer geen taal is geselecteerd, gebruik de standaard"
236
+
237
+ #@ crayon-syntax-highlighter
238
+ #: crayon_settings_wp.class.php:592
239
+ msgid "Parsing was successful"
240
+ msgstr "Laden is gelukt"
241
+
242
+ #@ crayon-syntax-highlighter
243
+ #: crayon_settings_wp.class.php:592
244
+ msgid "Parsing was unsuccessful"
245
+ msgstr "Laden is mislukt"
246
+
247
+ #@ crayon-syntax-highlighter
248
+ #: crayon_settings_wp.class.php:598
249
+ #, php-format
250
+ msgid "The selected language with id %s could not be loaded"
251
+ msgstr "Die geselecteerde taal met het id %s kon niet geladen worden"
252
+
253
+ #@ crayon-syntax-highlighter
254
+ #: crayon_settings_wp.class.php:602
255
+ msgid "Show Languages"
256
+ msgstr "Laat talen zien"
257
+
258
+ #@ crayon-syntax-highlighter
259
+ #: crayon_settings_wp.class.php:630
260
+ msgid "Enable Live Preview"
261
+ msgstr "Zet live preview aan"
262
+
263
+ #@ crayon-syntax-highlighter
264
+ #: crayon_settings_wp.class.php:635
265
+ #, php-format
266
+ msgid "The selected theme with id %s could not be loaded"
267
+ msgstr "Het geselecteerde thema met id %s kon niet geladen worden."
268
+
269
+ #@ crayon-syntax-highlighter
270
+ #: crayon_settings_wp.class.php:647
271
+ msgid "Custom Font Size"
272
+ msgstr "Aangepaste text grootte"
273
+
274
+ #@ crayon-syntax-highlighter
275
+ #: crayon_settings_wp.class.php:652
276
+ #, php-format
277
+ msgid "The selected font with id %s could not be loaded"
278
+ msgstr "Het geselecteerde lettertype met id %s kon niet geladen worden."
279
+
280
+ #@ crayon-syntax-highlighter
281
+ #: crayon_settings_wp.class.php:663
282
+ msgid "Enable plain code view and display"
283
+ msgstr "Zet plain code view aan"
284
+
285
+ #@ crayon-syntax-highlighter
286
+ #: crayon_settings_wp.class.php:668
287
+ msgid "Enable code copy/paste"
288
+ msgstr "Code kopieren/plakken mogelijk maken."
289
+
290
+ #@ crayon-syntax-highlighter
291
+ #: crayon_settings_wp.class.php:670
292
+ msgid "Enable opening code in a window"
293
+ msgstr "Code in een nieuw venster openen"
294
+
295
+ #@ crayon-syntax-highlighter
296
+ #: crayon_settings_wp.class.php:672
297
+ msgid "Tab size in spaces"
298
+ msgstr "Tab grootte in spaties"
299
+
300
+ #@ crayon-syntax-highlighter
301
+ #: crayon_settings_wp.class.php:681
302
+ msgid "Remove whitespace surrounding the shortcode content"
303
+ msgstr "Verwijder witruimte om de shortcode's"
304
+
305
+ #@ crayon-syntax-highlighter
306
+ #: crayon_settings_wp.class.php:700
307
+ msgid "When loading local files and a relative path is given for the URL, use the absolute path"
308
+ msgstr "Wanneer lokale bestanden worden geladen en een relatief pad is opgegeven, gebruik het absolute pad."
309
+
310
+ #@ crayon-syntax-highlighter
311
+ #: crayon_settings_wp.class.php:713
312
+ msgid "Clear the cache used to store remote code requests"
313
+ msgstr "Leeg de cache die gebruikt wordt om remote code aanvragen te bewaren."
314
+
315
+ #@ crayon-syntax-highlighter
316
+ #: crayon_settings_wp.class.php:715
317
+ msgid "Clear Now"
318
+ msgstr "Nu leeg maken"
319
+
320
+ #@ crayon-syntax-highlighter
321
+ #: crayon_settings_wp.class.php:721
322
+ msgid "Disable mouse gestures for touchscreen devices (eg. MouseOver)"
323
+ msgstr "Zet de Mouseover functie uit voor touchscreen apparaten"
324
+
325
+ #@ crayon-syntax-highlighter
326
+ #: crayon_settings_wp.class.php:722
327
+ msgid "Disable animations"
328
+ msgstr "Deactiveer animatie"
329
+
330
+ #@ crayon-syntax-highlighter
331
+ #: crayon_settings_wp.class.php:723
332
+ msgid "Disable runtime stats"
333
+ msgstr "Deactiveer runtime statistieken"
334
+
335
+ #@ crayon-syntax-highlighter
336
+ #: crayon_settings_wp.class.php:729
337
+ msgid "Log errors for individual Crayons"
338
+ msgstr "Log fouten voor individuele Crayons"
339
+
340
+ #@ crayon-syntax-highlighter
341
+ #: crayon_settings_wp.class.php:730
342
+ msgid "Log system-wide errors"
343
+ msgstr "Log systeem brede fouten"
344
+
345
+ #@ crayon-syntax-highlighter
346
+ #: crayon_settings_wp.class.php:731
347
+ msgid "Display custom message for errors"
348
+ msgstr "Laat een aangepast bericht zien voor fouten"
349
+
350
+ #@ crayon-syntax-highlighter
351
+ #: crayon_settings_wp.class.php:743
352
+ msgid "Show Log"
353
+ msgstr "Log bekijken"
354
+
355
+ #@ crayon-syntax-highlighter
356
+ #: crayon_settings_wp.class.php:745
357
+ msgid "Clear Log"
358
+ msgstr "Log leegmaken"
359
+
360
+ #@ crayon-syntax-highlighter
361
+ #: crayon_settings_wp.class.php:746
362
+ msgid "Email Admin"
363
+ msgstr "E-Mail Admin"
364
+
365
+ #@ crayon-syntax-highlighter
366
+ #: crayon_settings_wp.class.php:748
367
+ msgid "Email Developer"
368
+ msgstr "E-Mail Ontwikkelaar"
369
+
370
+ #@ crayon-syntax-highlighter
371
+ #: crayon_settings_wp.class.php:764
372
+ msgid "Version"
373
+ msgstr "Versie"
374
+
375
+ #@ crayon-syntax-highlighter
376
+ #: crayon_settings_wp.class.php:766
377
+ msgid "Developer"
378
+ msgstr "Ontwikkelaar"
379
+
380
+ #@ crayon-syntax-highlighter
381
+ #: crayon_settings_wp.class.php:790
382
+ msgid "The result of innumerable hours of hard work over many months. It's an ongoing project, keep me motivated!"
383
+ msgstr "Crayon is een project waar enorm veel uren in zitten, hou me gemotiveerd!"
384
+
385
+ #@ crayon-syntax-highlighter
386
+ #: crayon_settings_wp.class.php:626
387
+ #, php-format
388
+ msgid "Change the %1$sfallback language%2$s to change the sample code. Lines 5-7 are marked."
389
+ msgstr "Verander de %1$sStandard Sprache%2$s om de voorbeeld code te wijzigen. Lijn 5 tot 7 zijn geselecteerd."
390
+
391
+ #@ crayon-syntax-highlighter
392
+ #: crayon_settings.class.php:138
393
+ msgid "Hourly"
394
+ msgstr "Elk uur"
395
+
396
+ #@ crayon-syntax-highlighter
397
+ #: crayon_settings.class.php:138
398
+ msgid "Daily"
399
+ msgstr "Dagelijks"
400
+
401
+ #@ crayon-syntax-highlighter
402
+ #: crayon_settings.class.php:139
403
+ msgid "Weekly"
404
+ msgstr "Wekelijks"
405
+
406
+ #@ crayon-syntax-highlighter
407
+ #: crayon_settings.class.php:139
408
+ msgid "Monthly"
409
+ msgstr "Maandelijks"
410
+
411
+ #@ crayon-syntax-highlighter
412
+ #: crayon_settings.class.php:140
413
+ msgid "Immediately"
414
+ msgstr "Direct"
415
+
416
+ #@ crayon-syntax-highlighter
417
+ #: crayon_settings_wp.class.php:503
418
+ msgid "Crayon Help"
419
+ msgstr "Crayon Help"
420
+
421
+ #@ crayon-syntax-highlighter
422
+ #: crayon_settings_wp.class.php:716
423
+ msgid "Attempt to load Crayon's CSS and JavaScript only when needed"
424
+ msgstr "Probeer Crayons CSS & JavaScript te laden wanneer nodig."
425
+
426
+ #@ crayon-syntax-highlighter
427
+ #: crayon_settings_wp.class.php:703
428
+ msgid "Followed by your relative URL."
429
+ msgstr "Gevolgt door je relatieve URL"
430
+
431
+ #@ crayon-syntax-highlighter
432
+ #: crayon_settings_wp.class.php:750
433
+ msgid "The log is currently empty."
434
+ msgstr "Het log is momenteel leeg"
435
+
436
+ #@ crayon-syntax-highlighter
437
+ #: crayon_settings_wp.class.php:752
438
+ msgid "The log file exists and is writable."
439
+ msgstr "Het log bestand bestaat en is schrijfbaar"
440
+
441
+ #@ crayon-syntax-highlighter
442
+ #: crayon_settings_wp.class.php:752
443
+ msgid "The log file exists and is not writable."
444
+ msgstr "Het log bestand bestaat en is niet schrijfbaar"
445
+
446
+ #@ crayon-syntax-highlighter
447
+ #: crayon_settings_wp.class.php:754
448
+ msgid "The log file does not exist and is not writable."
449
+ msgstr "Het log bestand bestaat niet en is niet schrijfbaar"
450
+
451
+ #@ crayon-syntax-highlighter
452
+ #: crayon_settings_wp.class.php:591
453
+ #, php-format
454
+ msgid "%d language has been detected."
455
+ msgid_plural "%d languages have been detected."
456
+ msgstr[0] "%d taal is herkent"
457
+ msgstr[1] "%d talen zijn herkent"
458
+
459
+ #@ crayon-syntax-highlighter
460
+ #: crayon_settings_wp.class.php:694
461
+ msgid "Capture &lt;pre&gt; tags as Crayons"
462
+ msgstr "Gebruik &lt;pre&gt; tags als Crayons"
463
+
464
+ #@ crayon-syntax-highlighter
465
+ #: crayon_settings_wp.class.php:685
466
+ msgid "Show Mixed Language Icon (+)"
467
+ msgstr "Laat het Gemixte Taal Icoon zien"
468
+
469
+ #@ crayon-syntax-highlighter
470
+ #: crayon_settings_wp.class.php:683
471
+ msgid "Allow Mixed Language Highlighting with delimiters and tags."
472
+ msgstr "Sta gemixte talen highlighting to met scheidingstekens en tags"
473
+
474
+ #@ crayon-syntax-highlighter
475
+ #: crayon_settings_wp.class.php:690
476
+ msgid "Capture Mini Tags like [php][/php] as Crayons."
477
+ msgstr "Mini tags als [php][/php] gebruiken met Crayons"
478
+
479
+ #@ crayon-syntax-highlighter
480
+ #: crayon_settings_wp.class.php:695
481
+ msgid "Enable [plain][/plain] tag."
482
+ msgstr "Activeer [plain][/plain] Tag."
483
+
484
+ #@ crayon-syntax-highlighter
485
+ #: crayon_settings.class.php:189
486
+ msgid "Disable Mouse Events"
487
+ msgstr "Deactiveer Muis events."
488
+
489
+ #@ crayon-syntax-highlighter
490
+ #: crayon_settings_wp.class.php:666
491
+ msgid "Enable plain code toggling"
492
+ msgstr "Activeer plain code schakeling"
493
+
494
+ #@ crayon-syntax-highlighter
495
+ #: crayon_settings_wp.class.php:667
496
+ msgid "Show the plain code by default"
497
+ msgstr "Laat standaard de plain code zien"
498
+
499
+ #@ crayon-syntax-highlighter
500
+ #. translators: plugin header field 'Name'
501
+ #: crayon_wp.class.php:0
502
+ msgid "Crayon Syntax Highlighter"
503
+ msgstr ""
504
+
505
+ #@ crayon-syntax-highlighter
506
+ #. translators: plugin header field 'AuthorURI'
507
+ #: crayon_wp.class.php:0
508
+ msgid "http://ak.net84.net/"
509
+ msgstr ""
510
+
511
+ #@ crayon-syntax-highlighter
512
+ #. translators: plugin header field 'Author'
513
+ #: crayon_wp.class.php:0
514
+ msgid "Aram Kocharyan"
515
+ msgstr ""
516
+
517
+ #@ crayon-syntax-highlighter
518
+ #. translators: plugin header field 'PluginURI'
519
+ #: crayon_wp.class.php:0
520
+ msgid "http://ak.net84.net/projects/crayon-syntax-highlighter"
521
+ msgstr ""
522
+
523
+ #@ crayon-syntax-highlighter
524
+ #. translators: plugin header field 'Description'
525
+ #: crayon_wp.class.php:0
526
+ msgid "Supports multiple languages, themes, highlighting from a URL, local file or post text."
527
+ msgstr "Ondersteunt meerdere talen, themas, highlight vanaf een URL, lokale bestanden of een geposte text."
528
+
529
+ #@ crayon-syntax-highlighter
530
+ #: crayon_settings_wp.class.php:806
531
+ msgid "Donate"
532
+ msgstr "Doneer"
533
+
534
+ #@ crayon-syntax-highlighter
535
+ #: crayon_settings_wp.class.php:301
536
+ msgid "General"
537
+ msgstr "Algemeen"
538
+
539
+ #@ crayon-syntax-highlighter
540
+ #: crayon_settings_wp.class.php:302
541
+ msgid "Theme"
542
+ msgstr "Thema"
543
+
544
+ #@ crayon-syntax-highlighter
545
+ #: crayon_settings_wp.class.php:303
546
+ msgid "Font"
547
+ msgstr "Lettertype"
548
+
549
+ #@ crayon-syntax-highlighter
550
+ #: crayon_settings_wp.class.php:304
551
+ msgid "Metrics"
552
+ msgstr "Layout"
553
+
554
+ #@ crayon-syntax-highlighter
555
+ #: crayon_settings_wp.class.php:305
556
+ msgid "Toolbar"
557
+ msgstr "Toolbar"
558
+
559
+ #@ crayon-syntax-highlighter
560
+ #: crayon_settings_wp.class.php:306
561
+ msgid "Lines"
562
+ msgstr "Lijnen"
563
+
564
+ #@ crayon-syntax-highlighter
565
+ #: crayon_settings_wp.class.php:307
566
+ #: util/tag-editor/crayon_te_content.php:87
567
+ msgid "Code"
568
+ msgstr "Code"
569
+
570
+ #@ crayon-syntax-highlighter
571
+ #: crayon_settings_wp.class.php:309
572
+ msgid "Languages"
573
+ msgstr "Talen"
574
+
575
+ #@ crayon-syntax-highlighter
576
+ #: crayon_settings_wp.class.php:310
577
+ msgid "Files"
578
+ msgstr "Bestanden"
579
+
580
+ #@ crayon-syntax-highlighter
581
+ #: crayon_settings_wp.class.php:312
582
+ msgid "Misc"
583
+ msgstr "Extra"
584
+
585
+ #@ crayon-syntax-highlighter
586
+ #: crayon_settings_wp.class.php:315
587
+ msgid "Debug"
588
+ msgstr "Debuggen"
589
+
590
+ #@ crayon-syntax-highlighter
591
+ #: crayon_settings_wp.class.php:316
592
+ msgid "Errors"
593
+ msgstr "Fouten"
594
+
595
+ #@ crayon-syntax-highlighter
596
+ #: crayon_settings_wp.class.php:317
597
+ msgid "Log"
598
+ msgstr "Log"
599
+
600
+ #@ crayon-syntax-highlighter
601
+ #: crayon_settings_wp.class.php:320
602
+ msgid "About"
603
+ msgstr "Over"
604
+
605
+ #@ crayon-syntax-highlighter
606
+ #: crayon_settings_wp.class.php:632
607
+ msgid "Enqueue themes in the header (more efficient)."
608
+ msgstr "Laad thema's in de header (efficienter)"
609
+
610
+ #@ crayon-syntax-highlighter
611
+ #: crayon_settings_wp.class.php:658
612
+ msgid "Enqueue fonts in the header (more efficient)."
613
+ msgstr "Laad lettertype's in de header (efficienter)"
614
+
615
+ #@ crayon-syntax-highlighter
616
+ #: crayon_settings_wp.class.php:621
617
+ msgid "Loading..."
618
+ msgstr "Laden..."
619
+
620
+ #@ crayon-syntax-highlighter
621
+ #: crayon_settings_wp.class.php:621
622
+ #: crayon_settings_wp.class.php:804
623
+ #: util/theme-editor/editor.php:14
624
+ msgid "Theme Editor"
625
+ msgstr "Thema Editor"
626
+
627
+ #@ crayon-syntax-highlighter
628
+ #: crayon_settings_wp.class.php:671
629
+ msgid "Always display scrollbars"
630
+ msgstr "Altijd de scrollbar laten zien"
631
+
632
+ #@ crayon-syntax-highlighter
633
+ #: crayon_settings_wp.class.php:717
634
+ msgid "Disable enqueuing for page templates that may contain The Loop."
635
+ msgstr "Deactiveer het laden van pagina templates die De Loop bevatten"
636
+
637
+ #@ crayon-syntax-highlighter
638
+ #: crayon_settings_wp.class.php:720
639
+ msgid "Load Crayons only from the main Wordpress query"
640
+ msgstr "Laad Crayons alleen door de algemene Wordpress query"
641
+
642
+ #@ crayon-syntax-highlighter
643
+ #: util/theme-editor/editor.php:16
644
+ msgid "Back To Settings"
645
+ msgstr "Terug naar instellingen"
646
+
647
+ #@ crayon-syntax-highlighter
648
+ #: crayon_settings_wp.class.php:767
649
+ msgid "Translators"
650
+ msgstr "Vertalers"
651
+
652
+ #@ crayon-syntax-highlighter
653
+ #: crayon_formatter.class.php:266
654
+ msgid "Toggle Plain Code"
655
+ msgstr "Schakel tussen plain code"
656
+
657
+ #@ crayon-syntax-highlighter
658
+ #: crayon_formatter.class.php:268
659
+ msgid "Copy Plain Code"
660
+ msgstr "Kopier plain code"
661
+
662
+ #@ crayon-syntax-highlighter
663
+ #: crayon_formatter.class.php:270
664
+ msgid "Open Code In New Window"
665
+ msgstr "Open code in nieuw venster"
666
+
667
+ #@ crayon-syntax-highlighter
668
+ #: crayon_formatter.class.php:273
669
+ msgid "Toggle Line Numbers"
670
+ msgstr "Schakel lijn nummers"
671
+
672
+ #@ crayon-syntax-highlighter
673
+ #: crayon_formatter.class.php:279
674
+ msgid "Contains Mixed Languages"
675
+ msgstr "Bevat meerdere talen"
676
+
677
+ #@ crayon-syntax-highlighter
678
+ #: crayon_settings_wp.class.php:743
679
+ msgid "Hide Log"
680
+ msgstr "Log verbergen"
681
+
682
+ #@ crayon-syntax-highlighter
683
+ #: crayon_formatter.class.php:268
684
+ #, php-format
685
+ msgid "Press %s to Copy, %s to Paste"
686
+ msgstr "Druk %s om te kopieren, %s om te plakken"
687
+
688
+ #@ crayon-syntax-highlighter
689
+ #: crayon_settings_wp.class.php:308
690
+ msgid "Tags"
691
+ msgstr "Tags"
692
+
693
+ #@ crayon-syntax-highlighter
694
+ #: crayon_settings_wp.class.php:548
695
+ msgid "Inline Margin"
696
+ msgstr "Inline Rand"
697
+
698
+ #@ crayon-syntax-highlighter
699
+ #: crayon_settings_wp.class.php:691
700
+ msgid "Capture Inline Tags like {php}{/php} inside sentences."
701
+ msgstr "Tags die {php} {/php} bevatten gebruiken"
702
+
703
+ #@ crayon-syntax-highlighter
704
+ #: crayon_settings_wp.class.php:693
705
+ msgid "Capture `backquotes` as &lt;code&gt;"
706
+ msgstr "`backquotes` als &lt;code&gt; behandelen"
707
+
708
+ #@ crayon-syntax-highlighter
709
+ #: crayon_settings_wp.class.php:718
710
+ msgid "Allow Crayons inside comments"
711
+ msgstr "Sta Crayons toe in comments"
712
+
713
+ #@ crayon-syntax-highlighter
714
+ #: crayon_settings_wp.class.php:692
715
+ msgid "Wrap Inline Tags"
716
+ msgstr "Wrap inline tags"
717
+
718
+ #@ crayon-syntax-highlighter
719
+ #: crayon_settings_wp.class.php:311
720
+ msgid "Tag Editor"
721
+ msgstr ""
722
+
723
+ #@ crayon-syntax-highlighter
724
+ #: crayon_settings_wp.class.php:632
725
+ #: crayon_settings_wp.class.php:658
726
+ #: crayon_settings_wp.class.php:683
727
+ #: crayon_settings_wp.class.php:690
728
+ #: crayon_settings_wp.class.php:691
729
+ #: crayon_settings_wp.class.php:692
730
+ #: crayon_settings_wp.class.php:693
731
+ #: crayon_settings_wp.class.php:694
732
+ #: crayon_settings_wp.class.php:695
733
+ #: crayon_settings_wp.class.php:709
734
+ #: crayon_settings_wp.class.php:716
735
+ #: crayon_settings_wp.class.php:717
736
+ msgid "?"
737
+ msgstr ""
738
+
739
+ #@ crayon-syntax-highlighter
740
+ #: crayon_settings_wp.class.php:677
741
+ msgid "Decode HTML entities in code"
742
+ msgstr "HTML entities decoderen"
743
+
744
+ #@ crayon-syntax-highlighter
745
+ #: crayon_settings_wp.class.php:679
746
+ msgid "Decode HTML entities in attributes"
747
+ msgstr "HTML entities decoderen in attributen"
748
+
749
+ #@ crayon-syntax-highlighter
750
+ #: crayon_settings_wp.class.php:707
751
+ #, php-format
752
+ msgid "Use %s to separate setting names from values in the &lt;pre&gt; class attribute"
753
+ msgstr "Gebruik %s in de &lt;pre&gt; attribuut class om instelling namen van elkaar te scheiden"
754
+
755
+ #@ crayon-syntax-highlighter
756
+ #: util/tag-editor/crayon_tag_editor_wp.class.php:57
757
+ msgid "Add Crayon Code"
758
+ msgstr "Crayon code invoegen"
759
+
760
+ #@ crayon-syntax-highlighter
761
+ #: util/tag-editor/crayon_tag_editor_wp.class.php:58
762
+ msgid "Edit Crayon Code"
763
+ msgstr "Crayon code bewerken"
764
+
765
+ #@ crayon-syntax-highlighter
766
+ #: util/tag-editor/crayon_tag_editor_wp.class.php:59
767
+ msgid "Add"
768
+ msgstr "Toevoegen"
769
+
770
+ #@ crayon-syntax-highlighter
771
+ #: util/tag-editor/crayon_tag_editor_wp.class.php:60
772
+ msgid "Save"
773
+ msgstr "Opslaan"
774
+
775
+ #@ crayon-syntax-highlighter
776
+ #: util/tag-editor/crayon_te_content.php:65
777
+ msgid "Title"
778
+ msgstr "Titel"
779
+
780
+ #@ crayon-syntax-highlighter
781
+ #: util/tag-editor/crayon_te_content.php:67
782
+ msgid "A short description"
783
+ msgstr "korte beschrijving"
784
+
785
+ #@ crayon-syntax-highlighter
786
+ #: util/tag-editor/crayon_te_content.php:70
787
+ msgid "Inline"
788
+ msgstr ""
789
+
790
+ #@ crayon-syntax-highlighter
791
+ #: util/tag-editor/crayon_te_content.php:75
792
+ msgid "Language"
793
+ msgstr "Taal"
794
+
795
+ #@ crayon-syntax-highlighter
796
+ #: util/tag-editor/crayon_te_content.php:78
797
+ msgid "Marked Lines"
798
+ msgstr "Gemarkeerde lijnen"
799
+
800
+ #@ crayon-syntax-highlighter
801
+ #: util/tag-editor/crayon_te_content.php:79
802
+ msgid "(e.g. 1,2,3-5)"
803
+ msgstr "(bijv. 1,2,3-5)"
804
+
805
+ #@ crayon-syntax-highlighter
806
+ #: util/tag-editor/crayon_te_content.php:82
807
+ msgid "Disable Highlighting"
808
+ msgstr "Highlighting uitschakelen"
809
+
810
+ #@ crayon-syntax-highlighter
811
+ #: util/tag-editor/crayon_te_content.php:87
812
+ msgid "Clear"
813
+ msgstr "Verwijderen"
814
+
815
+ #@ crayon-syntax-highlighter
816
+ #: util/tag-editor/crayon_te_content.php:88
817
+ msgid "Paste your code here, or type it in manually."
818
+ msgstr "Code hier plakken of typen"
819
+
820
+ #@ crayon-syntax-highlighter
821
+ #: util/tag-editor/crayon_te_content.php:91
822
+ msgid "URL"
823
+ msgstr "URL"
824
+
825
+ #@ crayon-syntax-highlighter
826
+ #: util/tag-editor/crayon_te_content.php:93
827
+ msgid "Relative local path or absolute URL"
828
+ msgstr "Relatief lokaal pad of absolute URL"
829
+
830
+ #@ crayon-syntax-highlighter
831
+ #: util/tag-editor/crayon_te_content.php:96
832
+ msgid "If the URL fails to load, the code above will be shown instead. If no code exists, an error is shown."
833
+ msgstr "Wanneer de URL niet geladen kan worden, wordt de bovenstaande code gedisplayed. Als er geen code is komt er een error."
834
+
835
+ #@ crayon-syntax-highlighter
836
+ #: util/tag-editor/crayon_te_content.php:98
837
+ #, php-format
838
+ msgid "If a relative local path is given it will be appended to %s - which is defined in %sCrayon &gt; Settings &gt; Files%s."
839
+ msgstr "Als er een relatief lokaal pad is gegeven zal dat toegevoegd worden aan %s Dit adres is inn %sCrayon &gt;Instellingen %gt; data %s gedefiniteert"
840
+
841
+ #@ crayon-syntax-highlighter
842
+ #: util/tag-editor/crayon_te_content.php:117
843
+ msgid "Change the following settings to override their global values."
844
+ msgstr "Verander de volgende instellingen om de globale te overrulen"
845
+
846
+ #@ crayon-syntax-highlighter
847
+ #: util/tag-editor/crayon_te_content.php:119
848
+ msgid "Only changes (shown yellow) are applied."
849
+ msgstr "Alleen veranderingen (geel gemarkeerd) worden doorgevoerd."
850
+
851
+ #@ crayon-syntax-highlighter
852
+ #: util/tag-editor/crayon_te_content.php:121
853
+ #, php-format
854
+ msgid "Future changes to the global settings under %sCrayon &gt; Settings%s won't affect overridden settings."
855
+ msgstr "Toekomstige wijzigingen aan de globale instellingen onder %sCrayon &gt; Settings%s zullen overrulde settings niet beinvloeden."
856
+
857
+ #@ crayon-syntax-highlighter
858
+ #: crayon_settings_wp.class.php:719
859
+ msgid "Remove Crayons from excerpts"
860
+ msgstr "Verwijder Crayons uit de citaten"
861
+
862
+ #@ crayon-syntax-highlighter
863
+ #. translators: plugin header field 'Version'
864
+ #: crayon_wp.class.php:0
865
+ msgid "_1.9.4_beta1"
866
+ msgstr ""
867
+
util/sample/applescript.txt ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ -- Dialog
2
+ set dialogReply to display dialog
3
+ "Dialog Text" default answer
4
+ "Text Answer" hidden answer false
5
+ buttons {"Skip", "Okay", "Cancel"}
6
+ default button
7
+ "Okay" cancel button
8
+ "Skip" with title
9
+ "Dialog Window Title" with icon note
10
+ giving up after 20
util/sample/delphi.txt ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ type
2
+ THelloWorld = class
3
+ procedure Put;
4
+ end;
5
+
6
+ procedure THelloWorld.Put;
7
+ begin
8
+ Writeln('Hello, World!');
9
+ end;
util/tag-editor/crayon_tag_editor_wp.class.php CHANGED
@@ -22,6 +22,7 @@ class CrayonTagEditorWP {
22
  }
23
 
24
  public static function init_settings() {
 
25
  if (!self::$settings) {
26
  // Add settings
27
  CrayonSettingsWP::load_settings(TRUE);
@@ -57,7 +58,8 @@ class CrayonTagEditorWP {
57
  'dialog_title_add' => crayon__('Add Crayon Code'),
58
  'dialog_title_edit' => crayon__('Edit Crayon Code'),
59
  'submit_add' => crayon__('Add'),
60
- 'submit_edit' => crayon__('Save'),
 
61
  );
62
  }
63
  }
22
  }
23
 
24
  public static function init_settings() {
25
+
26
  if (!self::$settings) {
27
  // Add settings
28
  CrayonSettingsWP::load_settings(TRUE);
58
  'dialog_title_add' => crayon__('Add Crayon Code'),
59
  'dialog_title_edit' => crayon__('Edit Crayon Code'),
60
  'submit_add' => crayon__('Add'),
61
+ 'submit_edit' => crayon__('Save'),
62
+ 'extensions' => CrayonResources::langs()->extensions_inverted()
63
  );
64
  }
65
  }
util/tag-editor/crayon_te.js CHANGED
@@ -99,6 +99,7 @@ var CrayonTagEditor = new function() {
99
 
100
  var url = jQuery(s.url_css);
101
  var url_info = jQuery(s.url_info_css);
 
102
  url_refresh = function () {
103
  if (url.val().length > 0 && !url_info.is(":visible")) {
104
  url_info.show();
@@ -106,6 +107,21 @@ var CrayonTagEditor = new function() {
106
  } else if (url.val().length <= 0) {
107
  url_info.hide();
108
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  };
110
  url.keyup(url_refresh);
111
  url.change(url_refresh);
99
 
100
  var url = jQuery(s.url_css);
101
  var url_info = jQuery(s.url_info_css);
102
+ var exts = CrayonTagEditorSettings.extensions;
103
  url_refresh = function () {
104
  if (url.val().length > 0 && !url_info.is(":visible")) {
105
  url_info.show();
107
  } else if (url.val().length <= 0) {
108
  url_info.hide();
109
  }
110
+
111
+ // Check for extensions and select language automatically
112
+ var ext = CrayonSyntaxUtil.getExt(url.val());
113
+ if (ext) {
114
+ var lang = exts[ext];
115
+ // Otherwise use the extention as the lang
116
+ var lang_id = lang ? lang : ext;
117
+ var final_lang = CrayonTagEditorSettings.fallback_lang;
118
+ jQuery(s.lang_css + ' option').each(function() {
119
+ if (jQuery(this).val() == lang_id) {
120
+ final_lang = lang_id;
121
+ }
122
+ });
123
+ jQuery(s.lang_css).val(final_lang);
124
+ }
125
  };
126
  url.keyup(url_refresh);
127
  url.change(url_refresh);