public
Created

  • Download Gist
0001-HTTPS-support.patch
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
From d81aefc658a569e3adc84d02e8ae8782bfdc455e Mon Sep 17 00:00:00 2001
From: Tom Adams <tom@dxw.com>
Date: Tue, 27 Nov 2012 10:19:34 -0500
Subject: [PATCH] HTTPS support
 
---
sharethis.php | 40 ++++++++++++++++++++--------------------
wp_st_opt.js | 12 ++++++------
2 files changed, 26 insertions(+), 26 deletions(-)
 
diff --git a/sharethis.php b/sharethis.php
index 79f6859..b74a9a3 100644
--- a/sharethis.php
+++ b/sharethis.php
@@ -58,7 +58,7 @@ function install_ShareThis(){
if($widget==false || !preg_match('/stLight.options/',$widget)){
$pkey2=get_option('st_pubid');
$widget ="<script charset=\"utf-8\" type=\"text/javascript\">var switchTo5x=true;</script>";
- $widget.="<script charset=\"utf-8\" type=\"text/javascript\" src=\"http://w.sharethis.com/button/buttons.js\"></script>";
+ $widget.="<script charset=\"utf-8\" type=\"text/javascript\" src=\"https://ws.sharethis.com/button/buttons.js\"></script>";
$widget.="<script type=\"text/javascript\">stLight.options({publisher:'$pkey2'});var st_type='wordpress".trim(get_bloginfo('version'))."';</script>";
update_option('st_widget',$widget);
}
@@ -118,7 +118,7 @@ function getNewTag($oldTag){
$qs=parse_url($url);
if($qs['query']){
$qs=$qs['query'];
- $newUrl="http://w.sharethis.com/button/sharethis.js#$qs";
+ $newUrl="https://ws.sharethis.com/button/sharethis.js#$qs";
}
else{
$newUrl=$url;
@@ -349,7 +349,7 @@ function st_request_handler() {
$pkeyUpdated=false;
}
if(!preg_match('/stLight.options/',$widget) || $pkeyUpdated==true){
- $widgetTemp="<script charset=\"utf-8\" type=\"text/javascript\" src=\"http://w.sharethis.com/button/buttons.js\"></script>";
+ $widgetTemp="<script charset=\"utf-8\" type=\"text/javascript\" src=\"https://ws.sharethis.com/button/buttons.js\"></script>";
$widgetTemp.="<script type=\"text/javascript\">stLight.options({publisher:'$publisher_id'});var st_type='wordpress".trim(get_bloginfo('version'))."';</script>";
// In case of button style = sharethis (4/7) default.
@@ -560,7 +560,7 @@ function st_options_form() {
})();
</script>
- <link rel="stylesheet" href="http://w.sharethis.com/widget/wp_ex.css" type="text/css" media="screen" />
+ <link rel="stylesheet" href="https://ws.sharethis.com/widget/wp_ex.css" type="text/css" media="screen" />
<div class="wrap">
@@ -576,13 +576,13 @@ function st_options_form() {
<span id="currentType"></span>
</span>
<ul id="carousel" class="jcarousel-skin-tango">
- <li st_type="large"><div class="buttonType">Large Icons (1/7)</div><img src="http://w.sharethis.com/images/wp_ex4.png" alt=""></li>
- <li st_type="hcount"><div class="buttonType">Horizontal Count (2/7)</div><img src="http://w.sharethis.com/images/wp_ex2.png" alt=""></li>
- <li st_type="vcount"><div class="buttonType">Vertical Count (3/7)</div><img src="http://w.sharethis.com/images/wp_ex1.png" alt=""></li>
- <li st_type="sharethis"><div class="buttonType">Classic (4/7)</div><img src="http://w.sharethis.com/images/wp_ex7.png" alt=""></li>
- <li st_type="chicklet"><div class="buttonType">Regular Buttons (5/7)</div><img src="http://w.sharethis.com/images/wp_ex5.png" alt=""></li>
- <li st_type="chicklet2"><div class="buttonType">Regular Button No-Text (6/7)</div><img src="http://w.sharethis.com/images/wp_ex6.png" alt=""></li>
- <li st_type="buttons"><div class="buttonType">Buttons (7/7)</div><img src="http://w.sharethis.com/images/wp_ex3.png" alt=""></li>
+ <li st_type="large"><div class="buttonType">Large Icons (1/7)</div><img src="https://ws.sharethis.com/images/wp_ex4.png" alt=""></li>
+ <li st_type="hcount"><div class="buttonType">Horizontal Count (2/7)</div><img src="https://ws.sharethis.com/images/wp_ex2.png" alt=""></li>
+ <li st_type="vcount"><div class="buttonType">Vertical Count (3/7)</div><img src="https://ws.sharethis.com/images/wp_ex1.png" alt=""></li>
+ <li st_type="sharethis"><div class="buttonType">Classic (4/7)</div><img src="https://ws.sharethis.com/images/wp_ex7.png" alt=""></li>
+ <li st_type="chicklet"><div class="buttonType">Regular Buttons (5/7)</div><img src="https://ws.sharethis.com/images/wp_ex5.png" alt=""></li>
+ <li st_type="chicklet2"><div class="buttonType">Regular Button No-Text (6/7)</div><img src="https://ws.sharethis.com/images/wp_ex6.png" alt=""></li>
+ <li st_type="buttons"><div class="buttonType">Buttons (7/7)</div><img src="https://ws.sharethis.com/images/wp_ex3.png" alt=""></li>
</ul>
</div>
<br/>
@@ -601,15 +601,15 @@ function st_options_form() {
<div class="version">
<span class="heading">Choose which version of the widget you would like to use:</span><br /><br />
- <input type="radio" id="get5x" ' . $fiveCheck . ' name="st_version" value="5x" class="versionItem '.$fiveTag.'" onclick="$(\'.versionImage\').attr(\'src\', \'http://www.sharethis.com/images/Image_Multi_Post-1.png\');"></input>&nbsp;
+ <input type="radio" id="get5x" ' . $fiveCheck . ' name="st_version" value="5x" class="versionItem '.$fiveTag.'" onclick="$(\'.versionImage\').attr(\'src\', \'https://www.sharethis.com/images/Image_Multi_Post-1.png\');"></input>&nbsp;
<label id="multipost_label">Multi-Post</label>
&nbsp;&nbsp;&nbsp;&nbsp;
- <input type="radio" id="get4x" ' . $fourCheck . ' name="st_version" value="4x" class="versionItem '.$fourTag.'" onclick="$(\'.versionImage\').attr(\'src\', \'http://www.sharethis.com/images/Image_Classic-1.png\');"></input>&nbsp;
+ <input type="radio" id="get4x" ' . $fourCheck . ' name="st_version" value="4x" class="versionItem '.$fourTag.'" onclick="$(\'.versionImage\').attr(\'src\', \'https://www.sharethis.com/images/Image_Classic-1.png\');"></input>&nbsp;
<label id="classic_label">Classic</label>
<br />
- <img class="versionImage" src="http://www.sharethis.com/images/' . $wImage . '"></img>
+ <img class="versionImage" src="https://www.sharethis.com/images/' . $wImage . '"></img>
</div>
<br />
<div class="services">
@@ -715,7 +715,7 @@ function st_options_form() {
<label id="hoverbar_label">Enable Hovering Bar</label>
<div style="width: 900px;">
<p class="explainText">Would you like your sharing buttons to be persistent and remain on the page as the user scrolls? Well, then Hovering Bar is for you. It shows the sharing services on the left side to present a non-intrusive yet always available experience.</p>
- <img src="http://sharethis.com/images/new/get-sharing-tools/PREVIEW_Hover.png">
+ <img src="https://sharethis.com/images/new/get-sharing-tools/PREVIEW_Hover.png">
</div><br/><br/>
<div>
@@ -754,19 +754,19 @@ function st_options_form() {
<h2 id="stepHeadings">Pick a style</h2>
<ul id="themeList" class="subOptions" style="margin-top:0px;">
<li data-value="3" class="selected">
- <a><img class="widgetIconSelected" id="opt_theme3" src="http://sharethis.com/images/fbtheme_3.png"></a>
+ <a><img class="widgetIconSelected" id="opt_theme3" src="https://sharethis.com/images/fbtheme_3.png"></a>
</li>
<li data-value="4">
- <a><img class="widgetIconSelected" id="opt_theme4" src="http://sharethis.com/images/fbtheme_4.png"></a>
+ <a><img class="widgetIconSelected" id="opt_theme4" src="https://sharethis.com/images/fbtheme_4.png"></a>
</li>
<li data-value="5">
- <a><img class="widgetIconSelected" id="opt_theme5" src="http://sharethis.com/images/fbtheme_5.png"></a>
+ <a><img class="widgetIconSelected" id="opt_theme5" src="https://sharethis.com/images/fbtheme_5.png"></a>
</li>
<li data-value="6">
- <a><img class="widgetIconSelected" id="opt_theme6" src="http://sharethis.com/images/fbtheme_6.png"></a>
+ <a><img class="widgetIconSelected" id="opt_theme6" src="https://sharethis.com/images/fbtheme_6.png"></a>
</li>
<li data-value="7">
- <a><img class="widgetIconSelected" id="opt_theme7" src="http://sharethis.com/images/fbtheme_7.png"></a>
+ <a><img class="widgetIconSelected" id="opt_theme7" src="https://sharethis.com/images/fbtheme_7.png"></a>
</li>
</ul>
<div style="clear:both;"></div>
diff --git a/wp_st_opt.js b/wp_st_opt.js
index 4e5f900..c17f128 100644
--- a/wp_st_opt.js
+++ b/wp_st_opt.js
@@ -276,8 +276,8 @@ function generateShareNow(){
var tag='<script charset="utf-8" type="text/javascript">var switchTo5x='+switchTo5x+';</script>';
- //var tag='<script charset="utf-8" type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>';
- tag+='<script charset="utf-8" type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>';
+ //var tag='<script charset="utf-8" type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"></script>';
+ tag+='<script charset="utf-8" type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"></script>';
tag+='<script type="text/javascript">stLight.options({publisher:"'+pubkey+'"'+getCopyNShare()+'});</script>';
if ($('#st_sharenow').attr('checked')) {
@@ -313,7 +313,7 @@ function generateShareNow(){
generateHoverbar(defaultPosition);
}else{
// Simple buttons with NO sharenow and NO hoverbar
- var tag='<script charset="utf-8" type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>';
+ var tag='<script charset="utf-8" type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"></script>';
tag+='<script type="text/javascript">stLight.options({publisher:"'+pubkey+'"'+getCopyNShare()+'});</script>';
$('#st_widget').val(tag);
}
@@ -372,8 +372,8 @@ function generateHoverbar(defaultPosition) {
var tag='<script charset="utf-8" type="text/javascript">var switchTo5x='+switchTo5x+';</script>';
- //var tag='<script charset="utf-8" type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>';
- tag +='<script charset="utf-8" type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>';
+ //var tag='<script charset="utf-8" type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"></script>';
+ tag +='<script charset="utf-8" type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"></script>';
tag+='<script type="text/javascript">stLight.options({publisher:"'+pubkey+'"'+getCopyNShare()+'});</script>';
if ($('#st_hoverbar').attr('checked')) {
@@ -395,7 +395,7 @@ function generateHoverbar(defaultPosition) {
generateShareNow();
}else{
// Simple buttons with NO sharenow and NO hoverbar
- var tag='<script charset="utf-8" type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>';
+ var tag='<script charset="utf-8" type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"></script>';
tag+='<script type="text/javascript">stLight.options({publisher:"'+pubkey+'"'+getCopyNShare()+'});</script>';
$('#st_widget').val(tag);
}
--
1.7.10.4

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.