-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathplusone.html
44 lines (36 loc) · 967 Bytes
/
plusone.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
<style>
body {
padding: 0;
margin: 0;
overflow:hidden;
}
#plusone {
float: right;
}
</style>
<div id="plusone-div"></div>
<script type="text/javascript" src="https://apis.google.com/js/plusone.js">
{"parsetags": "explicit"}
</script>
<script type="text/javascript">
var url = decodeURIComponent(location.search.slice(1));
/*
if(location.search){
gapi.plusone.render("plusone-div", {
size: "standard",
count: "true",
href: /chrome-extension/.test(url)?'https://chrome.google.com/webstore/detail/pfphgaimeghgekhncbkfblhdhfaiaipf':url
})
}else{
gapi.plusone.render("plusone-div", {
size: "small",
count: "false",
href: "https://chrome.google.com/webstore/detail/pfphgaimeghgekhncbkfblhdhfaiaipf"
})
}*/
gapi.plusone.render("plusone-div", {
size: "small",
count: "true",
href: (location.search&&/http/.test(url))?url:"https://chrome.google.com/webstore/detail/pfphgaimeghgekhncbkfblhdhfaiaipf"
})
</script>