easymarklet 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -3,6 +3,10 @@ Easymarklet
3
3
 
4
4
  The easiest way to create bookmarklets for your rails app.
5
5
 
6
+ [Visit "Foo vs Baz" for demos and explanations of several types of bookmarklets.](http://foo-vs-baz.herokuapp.com/)
7
+
8
+ [Also, see the source code for "Foo vs Baz".](https://github.com/Octo-Labs/foo_vs_baz)
9
+
6
10
  Installation
7
11
  -------------------
8
12
 
@@ -14,15 +18,42 @@ Then run:
14
18
 
15
19
  bundle install
16
20
 
17
-
18
21
  Types of bookmarklets
19
22
  ----------------------------------
20
23
 
21
- Easymarklet supports two types of bookmarklets, simple bookmarklets and
22
- xdm bookmarklets. Simple bookmarklets allow new functionality to be
23
- injected into a page, but they are restricted in the amount of
24
- communication that can go back to your app. Xdm bookmarklets use
25
- [easyXDM](http://easyxdm.net/wp/) to allow cross domain communication.
24
+ Easymarklet supports several types of bookmarklets.
25
+
26
+ * **Bare Bookmarklets** Bare bookmarklets are very simple and best
27
+ suited for just redirecting the browser back to your app. They
28
+ generally don't have any UI.
29
+ * **Simple Bookmarklets** Simple bookmarklets allow for a basic UI and
30
+ easy stylesheet inclusion into the consumer page. Communication back to
31
+ your app is limited.
32
+ * **XDM Bookmarklets** XDM Bookmarklets use
33
+ [easyXDM](http://easyxdm.net/wp/) to allow cross domain communication
34
+ between your bookmarklet and your app. The UI is still fairly basic.
35
+ * **Iframe Bookmarklets** Iframe bookmarklets allow for cross domain
36
+ communication and enchanced UI by displaying the UI is an iframe so that
37
+ additional CSS and JS can be used safely. Note : If the iframe is
38
+ directed to a new page (such as by clicking on a link) the XDM
39
+ communication channel will be lost.
40
+ * **DLux Bookmarklets** DLux bookmarklets include a 'buffer' iframe that
41
+ will keep the communication channel open but still allow your UI to
42
+ navigate to a new page. This is the easiest way to take advantage of
43
+ existing page flows within a pop-over bookmarklet.
44
+
45
+
46
+ ## Examples
47
+ [Foo vs Baz](http://foo-vs-baz.herokuapp.com/) is a collection of working demos with walk throughs.
48
+
49
+ * [Bare Bookmarklets](http://foo-vs-baz.herokuapp.com/bare)
50
+ * [Simple Bookmarklets](http://foo-vs-baz.herokuapp.com/simple)
51
+ * [XDM Bookmarklets](http://foo-vs-baz.herokuapp.com/xdm)
52
+ * [Iframe Bookmarklets](http://foo-vs-baz.herokuapp.com/iframe)
53
+ * [DLux Bookmarklets](http://foo-vs-baz.herokuapp.com/dlux)
54
+
55
+
56
+
26
57
 
27
58
  Generating a new simple bookmarklet
28
59
  ---------------------------------
@@ -65,4 +96,9 @@ Then link to the consumer in a view:
65
96
  [See the XDM Bookmarklets wiki page for more info](https://github.com/Octo-Labs/easymarklet/wiki/XDM-Bookmarklets)
66
97
 
67
98
 
99
+ Generating other bookmarklets
100
+ ---------------------------------
101
+
102
+ See [Foo vs Baz](http://foo-vs-baz.herokuapp.com/) for more examples.
103
+
68
104
  This project rocks and uses MIT-LICENSE.
@@ -15,7 +15,7 @@
15
15
  var easymarkletDiv = null;
16
16
 
17
17
  var consumer_url = encodeURIComponent(document.location);
18
- var protocol = 'http://'
18
+ var protocol = (document.location.href.substring(0,8) === 'https://') ? 'https://' : 'http://'
19
19
  var host = '<%= Rails.application.config.action_controller.default_url_options[:host] %>';
20
20
  var port = '<%= Rails.application.config.action_controller.default_url_options[:port] %>';
21
21
  port = port === '' ? '' : ':' + port;
@@ -57,7 +57,7 @@
57
57
  //swf: "/assets/easyxdm.swf",
58
58
  onReady: function(){
59
59
  if(bookmarklet.producer.init){
60
- bookmarklet.producer.init(easymarklet_consumer_url,_this.consumer);
60
+ bookmarklet.producer.init(null,_this.consumer);
61
61
  }
62
62
  var oldHeight = 0;
63
63
  setInterval(function(){
@@ -1,3 +1,3 @@
1
1
  module Easymarklet
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easymarklet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-04 00:00:00.000000000 Z
12
+ date: 2013-03-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -222,7 +222,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
222
222
  version: '0'
223
223
  segments:
224
224
  - 0
225
- hash: 137451879451655284
225
+ hash: -4761417595461597
226
226
  required_rubygems_version: !ruby/object:Gem::Requirement
227
227
  none: false
228
228
  requirements:
@@ -231,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
231
231
  version: '0'
232
232
  segments:
233
233
  - 0
234
- hash: 137451879451655284
234
+ hash: -4761417595461597
235
235
  requirements: []
236
236
  rubyforge_project:
237
237
  rubygems_version: 1.8.24