pen 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 099560461c65def408d4e3691acfe44a60563be2
4
- data.tar.gz: 5fbdc58c898b9d0b3ab5ea3b967b66963f8c92a1
3
+ metadata.gz: 9ebfc8dae4a2d6191c70e6041ee51849977ddf5b
4
+ data.tar.gz: abb1ea23c91919804f03a24dd3cc2db42cdbdee0
5
5
  SHA512:
6
- metadata.gz: 888a2a02ee56a4a4a72c58786266cd40130f7c57c9386e58ab54f94a37e8b4e60e95c981ed7f4c26ff1e8ab0958fb90ce6b1944b0280492b91249ecc94bd0e27
7
- data.tar.gz: cbf3b30d1605641667dcefbd146d48f3bc26dc893243e883163e1be3b436b8f083421f1253b7832b3400c9a8a9c160f84a4b640c7292458b3aa525f398a918e3
6
+ metadata.gz: de55b5d985ba82996b2c507c9317333ab9fb47d6f3d5f3d2ab7c75a77897a597b04b70a030d80322c19deaf9cb41167913017026ad4e58a23ebec41a2c1bedbc
7
+ data.tar.gz: df334bb09293880fa58bfba79d54c78a28008904554330fe4217a3856d875685e3b0ede67817c0ce09cf401e6f2ff4c9df19778e097e8e07168cbbc72d1048ee
@@ -1,5 +1,5 @@
1
1
  /*! Licensed under MIT, https://github.com/sofish/pen */
2
- ~function() {
2
+ (function() {
3
3
 
4
4
  // only works with Pen
5
5
  if(!this.Pen) return;
@@ -67,6 +67,6 @@
67
67
  };
68
68
 
69
69
  // append to Pen
70
- Pen.prototype.markdown = covertor;
70
+ window.Pen.prototype.markdown = covertor;
71
71
 
72
- }();
72
+ }());
@@ -1,5 +1,6 @@
1
1
  /*! Licensed under MIT, https://github.com/sofish/pen */
2
- ~function(doc) {
2
+ /* jshint -W030, -W093, -W015 */
3
+ (function(doc) {
3
4
 
4
5
  var Pen, FakePen, utils = {};
5
6
 
@@ -27,14 +28,14 @@
27
28
 
28
29
  // shift a function
29
30
  utils.shift = function(key, fn, time) {
30
- time = time || 50;
31
- var queue = this['_shift_fn' + key], timeout = 'shift_timeout' + key, current;
32
- queue ? queue.concat([fn, time]) : (queue = [[fn, time]]);
33
- current = queue.pop();
34
- clearTimeout(this[timeout]);
35
- this[timeout] = setTimeout(function() {
36
- current[0]();
37
- }, time);
31
+ time = time || 50;
32
+ var queue = this['_shift_fn' + key], timeout = 'shift_timeout' + key, current;
33
+ queue ? queue.concat([fn, time]) : (queue = [[fn, time]]);
34
+ current = queue.pop();
35
+ clearTimeout(this[timeout]);
36
+ this[timeout] = setTimeout(function() {
37
+ current[0]();
38
+ }, time);
38
39
  };
39
40
 
40
41
  // merge: make it easy to have a fallback
@@ -217,7 +218,7 @@
217
218
  , effects = this._effectNode(node)
218
219
  , menu = this._menu
219
220
  , linkInput = menu.querySelector('input')
220
- , highlight
221
+ , highlight;
221
222
 
222
223
  // remove all highlights
223
224
  [].slice.call(menu.querySelectorAll('.active')).forEach(function(el) {
@@ -332,7 +333,7 @@
332
333
 
333
334
  Pen.prototype.destroy = function(isAJoke) {
334
335
  var destroy = isAJoke ? false : true
335
- , attr = isAJoke ? 'setAttribute' : 'removeAttribute'
336
+ , attr = isAJoke ? 'setAttribute' : 'removeAttribute';
336
337
 
337
338
  if(!isAJoke) {
338
339
  this._sel.removeAllRanges();
@@ -364,4 +365,4 @@
364
365
  // make it accessible
365
366
  this.Pen = doc.getSelection ? Pen : FakePen;
366
367
 
367
- }(document);
368
+ }(document));
@@ -1,3 +1,3 @@
1
1
  module Pen
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Torsten Trautwein
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-30 00:00:00.000000000 Z
11
+ date: 2013-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler