OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
3 * Copyright (C) 2006-2013 Eyeo GmbH | 3 * Copyright (C) 2006-2013 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 28 matching lines...) Expand all Loading... |
39 height: Math.max(document.body.offsetHeight || document.body.scrollHeight) | 39 height: Math.max(document.body.offsetHeight || document.body.scrollHeight) |
40 } | 40 } |
41 }, | 41 }, |
42 function(response) | 42 function(response) |
43 { | 43 { |
44 document.getElementById("filters").value = response.filters.join("\n"); | 44 document.getElementById("filters").value = response.filters.join("\n"); |
45 }); | 45 }); |
46 | 46 |
47 document.getElementById("filters").focus(); | 47 document.getElementById("filters").focus(); |
48 } | 48 } |
49 $(init); | 49 window.addEventListener("load", init, false); |
50 | 50 |
51 function onKeyDown(event) | 51 function onKeyDown(event) |
52 { | 52 { |
53 if (event.keyCode == 27) | 53 if (event.keyCode == 27) |
54 { | 54 { |
55 event.preventDefault(); | 55 event.preventDefault(); |
56 closeDialog(); | 56 closeDialog(); |
57 } | 57 } |
58 else if (event.keyCode == 13 && !event.shiftKey && !event.ctrlKey) | 58 else if (event.keyCode == 13 && !event.shiftKey && !event.ctrlKey) |
59 { | 59 { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 ); | 116 ); |
117 dragCoords = [event.screenX, event.screenY]; | 117 dragCoords = [event.screenX, event.screenY]; |
118 } | 118 } |
119 } | 119 } |
120 | 120 |
121 function onDragEnd(event) | 121 function onDragEnd(event) |
122 { | 122 { |
123 onDrag(event); | 123 onDrag(event); |
124 dragCoords = null; | 124 dragCoords = null; |
125 } | 125 } |
OLD | NEW |