-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbookmarklet.html
145 lines (117 loc) · 7.57 KB
/
bookmarklet.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>This is What Sucks | Bookmarklet</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="all" href="css/bootstrap.css" />
<link rel="stylesheet" type="text/css" media="all" href="css/main.css" />
<link rel="stylesheet" type="text/css" media="all" href="css/responsive.css" />
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="container">
<div class="left span9">
<a href="/">
<img class="logo" src="images/logo.png" />
<div class="title">This is What Sucks</div>
</a>
<!--<form class="form-search">
<input type="text" class="input-large search-query">
<button type="submit" class="btn">Search</button>
</form>-->
</div>
<div class="right span3">
<div class="facebook">
<div id="fb-root"></div>
<script src="js/whatsucks.js" type="text/javascript"></script>
<fb:login-button autologoutlink="true" perms="email,status_update"></fb:login-button>
<div id="fbUser"></div>
</div>
</div>
</div>
</div>
<div class="splash">
<div class="container">
<img src="images/splash.png" />
</div>
</div>
<div class="container">
<div class="content">
<div class="action">
<a href="#add-suck" role="button" class="btn btn-large btn-success submit" data-toggle="modal">Tell Us What Sucks</a>
<p class="bookmarklet"><a href="bookmarklet.html">(or install a bookmarklet)</a></p>
</div>
<div id="add-suck" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">X</button>
<h3 id="label">Tell us what sucks...</h3>
</div>
<div class="modal-body">
<form class="form-horizontal">
<div class="control-group">
<label class="control-label" for="inputSucks">What Sucks</label>
<div class="controls">
<input type="text" id="inputSucks" placeholder="Oscar Pistorius, Cancer">
</div>
</div>
</form>
<form class="form-horizontal">
<div class="control-group">
<label class="control-label" for="inputImage">Got an image?</label>
<div class="controls">
<input type="text" id="inputImage" placeholder="http://i.imgur.com/JJE9p.jpg">
</div>
</div>
</form>
<form class="form-horizontal">
<div class="control-group">
<label class="control-label" for="inputLink">Got a link?</label>
<div class="controls">
<input type="text" id="inputLink" placeholder="http://www.thisiswhatsucks.co">
</div>
</div>
</form>
<form class="form-horizontal">
<div class="control-group">
<label class="control-label" for="inputComment">Comment</label>
<div class="controls">
<textarea id="inputComment" rows="4"></textarea>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
<button class="btn btn-primary" onClick="pushThing();">Submit</button>
</div>
</div>
<h1 class="visible-desktop">Installing a 'What Sucks' Bookmarklet</h1>
<h1 class="hidden-desktop">Installing a 'What Sucks' Bookmarklet on an iOS Device</h1>
<div class="wrapper install clearfix">
<div class="visible-desktop">
<p class="desc">This bookmarklet will allow users to easily submit a link to the This is What Sucks website.</p>
<p>Just drag the following button to your toolbar.</p>
<p><a onclick="alert('To install the Bookmarklet button, drag it to your bookmarks toolbar!');return false;" href="javascript:n="";for(i=0;i<document.images.length;i++){n+='<a onclick=window.location=location.href;window.open("http://thisiswhatsucks.co/add.html?img='+document.images[i].src+'&link="+location.href,"targetWindow","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=560,height=481");><img style="max-width: 300px;" src='+document.images[i].src+"></a>"}if(n!=""){document.write("<div style=width: 100%;font-size:11px;font-family:verdana,sans;><h1>Pick an image to represent 'What Sucks'</h1>"+n+"</p>");void document.close()}else{alert("There are no images on this page.")}" class="btn btn-large">What Sucks</a></p>
<p>The 'What Sucks' Bookmarklet lets you grab images and videos from around the web and add them to the This is What Sucks website. Just click the bookmark when you see something you want to pin!</p>
</div>
<div class="hidden-desktop">
<h4>1. Bookmark this page</h4>
<p>Tap the middle icon below, then tap Add Bookmark, then tap Save.</p>
<h4>2. Select the text and copy it</h4>
<textarea rows="5">
javascript:n="";for(i=0;i<document.images.length;i++){n+='<a onclick=window.location=location.href;window.open("http://thisiswhatsucks.co/add.html?img='+document.images[i].src+'&link="+location.href,"targetWindow","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=560,height=481");><img style="max-width: 300px;" src='+document.images[i].src+"></a>"}if(n!=""){document.write("<div style=width: 100%;font-size:11px;font-family:verdana,sans;><h1>Pick an image to represent 'What Sucks'</h1>"+n+"</p>");void document.close()}else{alert("There are no images on this page.")}</textarea>
<h4>3. Edit the bookmark</h4>
<p>a) Tap the Bookmarks button in the toolbar.</p>
<p>b) Tap Edit. Select the ⚲ Pin It bookmark to edit.</p>
<p>c) Tap its URL, tap the x to clear it, tap-and-hold for the magnifying glass, then tap Paste.</p>
<p>d) Save the changes by tapping Done.</p>
<h4>4. Installation complete</h4>
<p>Installation should be complete! Select the 'What Sucks' bookmark from your Bookmarks list to use it!</p>
</div>
</div>
</div>
</div>
</body>
</html>