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

Side by Side Diff: html/static/js/settings.js

Issue 6353703170736128: Issue 1112 - Properly use polyfills in firstrun and settings pages (Closed)
Patch Set: Keeping the 'false' parameter Created July 23, 2014, 12:47 p.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 | « html/static/js/firstRun.js ('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 "use strict"; 1 "use strict";
2 2
3 function addListener(element, eventType, callback, propagate)
4 {
5 if (element.addEventListener)
6 {
7 element.addEventListener(eventType, callback, propagate);
8 }
9 else
10 {
11 element.attachEvent("on" + eventType, callback);
12 }
13 }
14
15 (function() 3 (function()
16 { 4 {
17 function init() 5 function init()
18 { 6 {
19 var manageButton = document.getElementById("manageExceptions"); 7 var manageButton = document.getElementById("manageExceptions");
20 addListener(manageButton, "click", toggleManage, false); 8 manageButton.addEventListener("click", toggleManage, false);
21 } 9 }
22 10
23 function toggleManage(ev) 11 function toggleManage(ev)
24 { 12 {
25 var exceptions = document.getElementById("exceptions"); 13 var exceptions = document.getElementById("exceptions");
26 14
27 if (exceptions.getAttribute("class")) 15 if (exceptions.getAttribute("class"))
28 exceptions.removeAttribute("class"); 16 exceptions.removeAttribute("class");
29 else 17 else
30 exceptions.setAttribute("class", "visible"); 18 exceptions.setAttribute("class", "visible");
31 19
32 // IE6-only 20 // IE6-only
33 if (exceptions.getAttribute("className")) 21 if (exceptions.getAttribute("className"))
34 exceptions.removeAttribute("className"); 22 exceptions.removeAttribute("className");
35 else 23 else
36 exceptions.setAttribute("className", "visible"); 24 exceptions.setAttribute("className", "visible");
37 } 25 }
38 26
39 init(); 27 init();
40 })(); 28 })();
OLDNEW
« no previous file with comments | « html/static/js/firstRun.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld