Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: head.html

Issue 5119431676002304: Issue 1128 - Added ADC as supporter to Manifesto page (Closed)
Patch Set: Created Aug. 16, 2014, 8:44 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « body.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <link rel="canonical" href="http://acceptableads.org/"/> 1 <link rel="canonical" href="http://acceptableads.org/"/>
2 <meta property="og:type" content="website"/> 2 <meta property="og:type" content="website"/>
3 <meta property="og:image" content="http://acceptableads.org/images/manifesto/acc eptable-ads-manifesto-share.png?a=show"/> 3 <meta property="og:image" content="http://acceptableads.org/images/manifesto/acc eptable-ads-manifesto-share.png?a=show"/>
4 <meta property="og:url" content="http://acceptableads.org"/> 4 <meta property="og:url" content="http://acceptableads.org"/>
5 <meta name="google-site-verification" content="3deBAaPY4M2OuOe576R36TC28S5svlfRR sdaGS6WCXg"/> 5 <meta name="google-site-verification" content="3deBAaPY4M2OuOe576R36TC28S5svlfRR sdaGS6WCXg"/>
6 <meta charset="utf-8"/> 6 <meta charset="utf-8"/>
7 <meta name="viewport" content="width=device-width, initial-scale=1"/> 7 <meta name="viewport" content="width=device-width, initial-scale=1"/>
8 <style type="text/css"> 8 <style type="text/css">
9 @font-face 9 @font-face
10 { 10 {
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 margin: 0px; 212 margin: 0px;
213 } 213 }
214 214
215 #join-org img 215 #join-org img
216 { 216 {
217 width: 19px; 217 width: 19px;
218 height: 19px; 218 height: 19px;
219 margin-top: 6px; 219 margin-top: 6px;
220 } 220 }
221 221
222 #join-org strong 222 #join-org strong,
223 #supporters-more-link
223 { 224 {
224 font-weight: normal; 225 font-weight: normal;
225 font-size: 15px; 226 font-size: 15px;
226 color: #78b364; 227 color: #78b364;
227 text-decoration: underline; 228 text-decoration: underline;
228 } 229 }
229 230
231 #supporters-more
232 {
233 margin-bottom: 20px;
234 }
235
230 #social button 236 #social button
231 { 237 {
232 width: 100%; 238 width: 100%;
233 margin: 0px; 239 margin: 0px;
234 margin-bottom: 10px; 240 margin-bottom: 10px;
235 } 241 }
236 242
237 #facebook button 243 #facebook button
238 { 244 {
239 background-color: #45658a; 245 background-color: #45658a;
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 return; 482 return;
477 483
478 document.getElementById("signees").removeAttribute("hidden"); 484 document.getElementById("signees").removeAttribute("hidden");
479 var signeesCount = document.getElementById("signees-count"); 485 var signeesCount = document.getElementById("signees-count");
480 if ("textContent" in signeesCount) 486 if ("textContent" in signeesCount)
481 signeesCount.textContent = count; 487 signeesCount.textContent = count;
482 else 488 else
483 signeesCount.innerText = count; 489 signeesCount.innerText = count;
484 } 490 }
485 491
486 function addListener(obj, type, listener, useCapture) 492 function addListener(obj, type, listener, useCapture, preventDefault)
487 { 493 {
488 if ("addEventListener" in obj) 494 if ("addEventListener" in obj)
489 { 495 {
490 obj.addEventListener(type, listener, useCapture); 496 obj.addEventListener(type, function(ev)
497 {
498 listener(ev);
499 if (preventDefault)
500 ev.preventDefault();
Wladimir Palant 2014/08/18 12:31:19 A more consistent approach would be using the retu
Thomas Greiner 2014/08/19 09:32:34 Done.
501 }, useCapture);
491 } 502 }
492 else 503 else
493 { 504 {
494 if (type == "DOMContentLoaded") 505 if (type == "DOMContentLoaded")
495 type = "load"; 506 type = "load";
496 507
497 obj.attachEvent("on" + type, function() 508 obj.attachEvent("on" + type, function()
498 { 509 {
499 listener(event); 510 listener(event);
511 event.returnValue = preventDefault;
Wladimir Palant 2014/08/18 12:31:19 This should assign !preventDefault - see onclick="
Thomas Greiner 2014/08/19 09:32:34 Done.
500 }); 512 });
501 } 513 }
502 } 514 }
503 515
504 addListener(window, "DOMContentLoaded", function(ev) 516 addListener(window, "DOMContentLoaded", function(ev)
505 { 517 {
506 fetchNumberOfSignees(); 518 fetchNumberOfSignees();
519
520 var moreSupporters = document.getElementById("supporters-more-link");
521 addListener(moreSupporters, "click", function(ev)
522 {
523 var overflow = document.getElementById("supporters-overflow");
524 overflow.removeAttribute("hidden");
525 moreSupporters.parentNode.removeChild(moreSupporters);
526 }, false, true);
507 527
508 var readmore = document.getElementById("readmore"); 528 var readmore = document.getElementById("readmore");
509 addListener(readmore, "click", function(ev) 529 addListener(readmore, "click", function(ev)
510 { 530 {
511 var fulltext = document.getElementById("fulltext"); 531 var fulltext = document.getElementById("fulltext");
512 if (fulltext.hasAttribute("hidden")) 532 if (fulltext.hasAttribute("hidden"))
513 fulltext.removeAttribute("hidden"); 533 fulltext.removeAttribute("hidden");
514 else 534 else
515 fulltext.hidden = "hidden"; 535 fulltext.hidden = "hidden";
516 536
517 ev.preventDefault(); 537 if ("stopPropagation" in ev)
518 ev.stopPropagation(); 538 ev.stopPropagation();
519 }, false); 539 }, false, true);
520 540
521 var shareTitle = document.getElementById("share-text-title")[textAttr]; 541 var shareTitle = document.getElementById("share-text-title")[textAttr];
522 var shareDescription = document.getElementById("share-text-description")[textA ttr]; 542 var shareDescription = document.getElementById("share-text-description")[textA ttr];
523 var facebookButton = document.getElementById("facebook"); 543 var facebookButton = document.getElementById("facebook");
524 facebookButton.href = "https://www.facebook.com/sharer/sharer.php?s=100&p%5Bti tle%5D=" 544 facebookButton.href = "https://www.facebook.com/sharer/sharer.php?s=100&p%5Bti tle%5D="
525 + encodeURIComponent(shareTitle) 545 + encodeURIComponent(shareTitle)
526 + "&p%5Bsummary%5D=" 546 + "&p%5Bsummary%5D="
527 + encodeURIComponent(shareDescription) 547 + encodeURIComponent(shareDescription)
528 + "&p%5Burl%5D=http%3A%2F%2Facceptableads.org%2F"; 548 + "&p%5Burl%5D=http%3A%2F%2Facceptableads.org%2F";
529 var twitterButton = document.getElementById("twitter"); 549 var twitterButton = document.getElementById("twitter");
530 twitterButton.href = "https://twitter.com/intent/tweet?text=" 550 twitterButton.href = "https://twitter.com/intent/tweet?text="
531 + encodeURIComponent(shareTitle) 551 + encodeURIComponent(shareTitle)
532 + "&url=http%3A%2F%2Facceptableads.org%2F"; 552 + "&url=http%3A%2F%2Facceptableads.org%2F";
533 }, false); 553 }, false, false);
534 554
535 function checkCollapse() 555 function checkCollapse()
536 { 556 {
537 if (document.documentElement.offsetWidth < 500) 557 if (document.documentElement.offsetWidth < 500)
538 return; 558 return;
539 559
540 var social = document.getElementById("sign"); 560 var social = document.getElementById("sign");
541 var placeholder = document.getElementById("sign-placeholder"); 561 var placeholder = document.getElementById("sign-placeholder");
542 var classes = social.className.split(" "); 562 var classes = social.className.split(" ");
543 563
(...skipping 11 matching lines...) Expand all
555 } 575 }
556 } 576 }
557 else if (scrollTop < placeholder.offsetTop + placeholder.offsetHeight - 100) 577 else if (scrollTop < placeholder.offsetTop + placeholder.offsetHeight - 100)
558 { 578 {
559 classes.splice(classes.indexOf("collapsed"), 1); 579 classes.splice(classes.indexOf("collapsed"), 1);
560 placeholder.style.height = "0px"; 580 placeholder.style.height = "0px";
561 social.className = classes.join(" "); 581 social.className = classes.join(" ");
562 } 582 }
563 } 583 }
564 584
565 addListener(window, "scroll", checkCollapse); 585 addListener(window, "scroll", checkCollapse, false, false);
566 addListener(window, "resize", checkCollapse); 586 addListener(window, "resize", checkCollapse, false, false);
567 --></script> 587 --></script>
OLDNEW
« no previous file with comments | « body.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld