-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
237 lines (236 loc) · 12.6 KB
/
index.html
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JSO Tools</title>
<link rel="stylesheet" href="pure-min.css">
<link rel="shortcut icon" href="favicon.ico">
<style>
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
a {
text-decoration: none;
color: rgb(61, 146, 201);
}
a:hover,
a:focus {
text-decoration: underline;
}
h3 {
font-weight: 100;
}
.pure-img-responsive {
max-width: 100%;
height: auto;
}
#layout {
padding: 0;
}
.header {
text-align: center;
top: auto;
margin: 3em auto;
}
.sidebar {
background: rgb(61, 79, 93);
color: #fff;
}
.brand-title,
.brand-tagline {
margin: 0;
}
.brand-title {
text-transform: uppercase;
}
.brand-tagline {
font-weight: 300;
color: rgb(176, 202, 219);
}
.content-subhead {
text-transform: uppercase;
color: #aaa;
border-bottom: 1px solid #eee;
padding: 0.4em 0;
font-size: 80%;
font-weight: 500;
letter-spacing: 0.1em;
}
.content {
padding: 2em 1em 0;
}
.post {
padding-bottom: 1em;
}
.post-title {
font-size: 1.5em;
color: #222;
margin-bottom: 0.2em;
}
.post-button {
float: right;
margin-left: 1em;
text-decoration: none;
-webkit-user-drag: initial !important;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: -moz-none;
-o-user-select: none;
user-select: none;
}
.post-button:hover {
text-decoration: none;
}
.post-meta {
color: #999;
font-size: 90%;
margin: 0;
}
.post-category {
margin: 0 0.1em;
padding: 0.3em 1em;
color: #fff;
background: #999;
font-size: 80%;
}
.post-category-updated {
background: #5aba59;
}
.post-description {
font-family: Georgia, "Cambria", serif;
color: #444;
line-height: 1.8em;
}
.footer {
text-align: center;
padding: 1em 0;
}
.footer a {
color: #ccc;
font-size: 80%;
}
.footer .pure-menu a:hover,
.footer .pure-menu a:focus {
background: none;
}
@media (min-width: 48em) {
.content {
padding: 2em 3em 0;
margin-left: 25%;
}
.header {
margin: 80% 2em 0;
text-align: left;
}
.sidebar {
position: fixed;
top: 0;
bottom: 0;
}
}
</style>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-61758561-2', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4">
<div class="header">
<h1 class="brand-title">MJS Helpers</h1>
<h2 class="brand-tagline">Tools to help working with the CMS</h2>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<div class="posts">
<h1 class="content-subhead">Bookmarklets: Drag any of these buttons to your browser's bookmarks bar</h1>
<section class="post">
<header class="post-header">
<a class="post-button pure-button pure-button-primary" onmousedown="ga('send', 'event', 'bookmarklet', 'search in click');" href='//javascript:(function(){var siteCodes={"www.jsonline.com":"PMJS"},siteCode=siteCodes[window.location.host];if("PMJS"===siteCode){var id=parseInt(window.location.pathname.split("/").slice(-2)[0],10);if(0<id){var searchUrl="https://presto-wigroup.gannettdigital.com/#/?k="+id+"&st="+siteCode+"&pg=1&pgs=25";window.open(searchUrl,"_blank")}}else alert("This only works on www.jsonline.com.");})();' title="Click and drag this button to your browser's bookmark bar.">Search in Clickability</a>
<h2 class="post-title">Search this content in Presto</h2>
<p class="post-meta">
<span class="post-category post-category-updated" href="#">Updated: Aug. 1, 2016</span>
</p>
</header>
<div class="post-description">
<p>
This bookmarklet helps you jump from an article on the JSOnline.com site to the item in the Presto interface. When you're on any JSOnline.com webpage, clicking this bookmarklet will instantly take you to a Presto search results page for the content ID. *This will open the Presto search in new browser tab, so you may need to configure your browsers to allow pop-ups from the site you are using this bookmarklet on.
</p>
</div>
</section>
<section class="post">
<header class="post-header">
<a class="post-button pure-button pure-button-primary" onmousedown="ga('send', 'event', 'bookmarklet', 'toggle stage');" href='javascript:(function(){var a=window.location.host;window.location.host=-1<a.indexOf("stage.")||-1<a.indexOf("dev.")?a.replace(/^(stage|dev)\./,""):"stage."+a;})();' title="Click and drag this button to your browser's bookmark bar.">Toggle Stage/Production</a>
<h2 class="post-title">Toggle between stage/production environments</h2>
<p class="post-meta">
<span class="post-category post-category-updated" href="#">Updated: Mar. 27, 2015</span>
</p>
</header>
<div class="post-description">
<p>
This bookmarklet helps you preview a page before publishing it live to the site. When you're on any JSOnline.com webpage, clicking this bookmarklet with reload the page in the Staging/In Progress environment. Conversely, if you're in Stage, it will reload the page in the Production/Live environment.
</p>
</div>
</section>
<section class="post">
<header class="post-header">
<a class="post-button pure-button pure-button-primary" onmousedown="ga('send', 'event', 'bookmarklet', 'cache bust');" href='javascript:(function(){for(var a=window.location.search.substring(1),b="",c=0;8>c;c++)var d=Math.floor(26*Math.random()),b=b+"ABCDEFGHIJKLMnopqrstuvwxyz".substring(d,d+1);a=0<a.length?-1<a.indexOf("&c=")?a.replace(/&c=\w{7,9}/,"&c="+b):a+"&c="+b:"?c="+b;window.location.search=a;})();' title="Click and drag this button to your browser's bookmark bar.">Cache Bust</a>
<h2 class="post-title">Get the latest version of the page</h2>
<p class="post-meta">
<span class="post-category post-category-updated" href="#">Updated: Aug. 4, 2015</span>
</p>
</header>
<div class="post-description">
<p>
This bookmarklet helps you forces your browser to get the most updated version of the page. When you're on any JSOnline.com webpage, clicking this bookmarklet will append a query parameter to the url and reload the page. The additional query parameter to will force the page to be re-generated by Clickability to reflect recent changes to the content.
</p>
</div>
</section>
<section class="post">
<header class="post-header">
<a class="post-button pure-button pure-button-primary" onmousedown="ga('send', 'event', 'bookmarklet', 'toggle mobile');" href='javascript:(function(){var url=window.location.href,newUrl="";if(-1<url.indexOf("jsonline.com"))newUrl=-1<url.indexOf("www.jsonline.com")?url.replace(/www\./i,"m."):document.querySelector("link[rel='canonical']").href+window.location.search;else if(-1<url.indexOf("?d=mobile"))var tempUrl=url.replace(/\?d=mobile&/i,"?"),newUrl=tempUrl.replace(/\?d=mobile/i,"");else newUrl=-1<url.indexOf("&d=mobile")?url.replace(/&d=mobile/i,""):-1<window.location.search.indexOf("?")?url+"&d=mobile":url+"?d=mobile";window.location.href=newUrl;})();' title="Click and drag this button to your browser's bookmark bar.">Toggle Mobile</a>
<h2 class="post-title">Toggle mobile rendering</h2>
<p class="post-meta">
<span class="post-category post-category-updated" href="#">Updated: Dec. 28, 2015</span>
</p>
</header>
<div class="post-description">
<p>
This bookmarklet will modify the url of the page to render the page using the mobile templates. This should work on all sites.
</p>
</div>
</section>
<section class="post">
<header class="post-header">
<a class="post-button pure-button pure-button-primary" onmousedown="ga('send', 'event', 'bookmarklet', 'facebook refresh');" href='javascript:(function(){ var encodedUrl=encodeURIComponent(window.location.href);function createXMLHTTPObject(){var XMLHttpFactories=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}];var xmlhttp=false;for(var i=0;i<XMLHttpFactories.length;i++){try{xmlhttp=XMLHttpFactories[i]()}catch(e){continue}break}return xmlhttp} function sendRequest(articleUrl){var req=createXMLHTTPObject();if(!req||!articleUrl)return null;req.open("POST","http://graph.facebook.com/",true);req.setRequestHeader("Content-type","application/x-www-form-urlencoded");req.onreadystatechange=function(){if(req.status==200&&req.readyState==4){console.log(req.responseText);var obj=JSON.parse(req.responseText);alert("Article refreshed.\nTitle: "+obj.title+"\nurl: "+obj.url)}};req.send("id="+encodedUrl+"&scrape=true")}sendRequest(encodedUrl);})();' title="Click and drag this button to your browser's bookmark bar.">Facebook Refresh</a>
<h2 class="post-title">Facebook debug the article page</h2>
<p class="post-meta">
<span class="post-category post-category-updated" href="#">Updated: Feb. 20, 2015</span>
</p>
</header>
<div class="post-description">
<p>
This bookmarklet helps you refresh the metadata shown by Facebook in user's timelines. When you're on any JSOnline.com article page, clicking this bookmarklet will resubmit the article page's url to the <a href="https://developers.facebook.com/tools/debug/">Facebook Debugger</a> which should prompt Facebook to re-scrape the article headline, tease, and image that's associated with the article.
</p>
</div>
</section>
</div> <!-- /.posts -->
<div class="footer">
<div class="pure-menu pure-menu-horizontal">
<ul>
<li class="pure-menu-item"><a href="mailto:michael.andre@jmg.com" target="_blank" class="pure-menu-link">Help</a></li>
</ul>
</div>
</div>
</div> <!-- /.content -->
</div> <!-- /#layout -->
</body>
</html>