pageflow-oembed 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +8 -0
- data/README.md +10 -0
- data/app/assets/javascript/pageflow/oembed.js +2 -1
- data/lib/pageflow/oembed/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 768e67651b4278343646a683061082b75803f7af
|
4
|
+
data.tar.gz: 0c9df1cbfe40cb14740b3eb57170d7cb45304dd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbc5417af0cf5e20ffed703cd89c48173625366adbe87b1fa9c0c116011151654c62301def80b64947247b303edf3965bdf30e08e10bf221517e7e003a6e5115
|
7
|
+
data.tar.gz: 86ba5adcc366f271755bfd02bbf8cce48463f6787cdefb38444bded60cf8a0874baa5546ea4dcae273a3a4f43f21389d1b2043b1a38aef5b148ead6245ed1e34
|
data/CHANGELOG
ADDED
data/README.md
CHANGED
@@ -91,6 +91,16 @@ Add it to the asset pipeline:
|
|
91
91
|
//= require pageflow/oembed
|
92
92
|
```
|
93
93
|
|
94
|
+
Finally, mount it in `routes.rb`:
|
95
|
+
|
96
|
+
```ruby
|
97
|
+
Rails.application.routes.draw do
|
98
|
+
...
|
99
|
+
mount Pageflow::Oembed::Engine, at: '/oembed'
|
100
|
+
...
|
101
|
+
end
|
102
|
+
```
|
103
|
+
|
94
104
|
## Usage
|
95
105
|
|
96
106
|
In the Pageflow editor, insert a plain old link into the content text. Voila!
|
@@ -39,7 +39,8 @@ pageflow.widgetTypes.register('pageflow_oembed', {
|
|
39
39
|
|
40
40
|
embedTwitter: function(link) {
|
41
41
|
var url = link.getAttribute('href');
|
42
|
-
var
|
42
|
+
var match = /(\d+)$/.exec(url);
|
43
|
+
tweetId = match[0];
|
43
44
|
var theme = this.page(link).classList.contains('invert') ? 'light' : 'dark';
|
44
45
|
|
45
46
|
link.insertAdjacentHTML('beforebegin', '<span id="tweet-'+tweetId+'"></span>')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pageflow-oembed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joost Baaij
|
@@ -121,6 +121,7 @@ files:
|
|
121
121
|
- ".gitignore"
|
122
122
|
- ".rspec"
|
123
123
|
- ".travis.yml"
|
124
|
+
- CHANGELOG
|
124
125
|
- CODE_OF_CONDUCT.md
|
125
126
|
- Gemfile
|
126
127
|
- LICENSE.txt
|