pen 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/pen/markdown.js +3 -3
- data/app/assets/javascripts/pen/pen.js +13 -12
- data/lib/pen/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ebfc8dae4a2d6191c70e6041ee51849977ddf5b
|
4
|
+
data.tar.gz: abb1ea23c91919804f03a24dd3cc2db42cdbdee0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de55b5d985ba82996b2c507c9317333ab9fb47d6f3d5f3d2ab7c75a77897a597b04b70a030d80322c19deaf9cb41167913017026ad4e58a23ebec41a2c1bedbc
|
7
|
+
data.tar.gz: df334bb09293880fa58bfba79d54c78a28008904554330fe4217a3856d875685e3b0ede67817c0ce09cf401e6f2ff4c9df19778e097e8e07168cbbc72d1048ee
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*! Licensed under MIT, https://github.com/sofish/pen */
|
2
|
-
|
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
|
-
|
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
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
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));
|
data/lib/pen/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2013-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|