easymarklet 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,11 +15,16 @@
15
15
  var easymarkletDiv = null;
16
16
 
17
17
  var consumer_url = encodeURIComponent(document.location);
18
- var protocol = (document.location.href.substring(0,8) === 'https://') ? 'https://' : 'http://'
18
+ // Try to determine the protocol to be used based on the current page
19
+ var protocol = (document.location.href.substring(0,8) === 'https') ? 'https' : 'http'
20
+ // Allow protocol to be overridden by the bookmarklet definition
21
+ if(bookmarklet.protocol){
22
+ protocol = bookmarklet.protocol;
23
+ }
19
24
  var host = '<%= Rails.application.config.action_controller.default_url_options[:host] %>';
20
25
  var port = '<%= Rails.application.config.action_controller.default_url_options[:port] %>';
21
26
  port = port === '' ? '' : ':' + port;
22
- var full_host = protocol + host + port;
27
+ var full_host = protocol + '://' + host + port;
23
28
 
24
29
  // Once easyXDM is available this will create an iframe and set up the RPC channel
25
30
  function scriptOnLoad(){
@@ -1,3 +1,3 @@
1
1
  module Easymarklet
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
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.10
4
+ version: 0.0.11
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: 2013-03-28 00:00:00.000000000 Z
12
+ date: 2013-03-29 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: -4147224777850264723
225
+ hash: 330017604297569305
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: -4147224777850264723
234
+ hash: 330017604297569305
235
235
  requirements: []
236
236
  rubyforge_project:
237
237
  rubygems_version: 1.8.24