| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 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 11 matching lines...) Expand all Loading... | |
| 22 window.addEventListener("dragstart", onDragStart, false); | 22 window.addEventListener("dragstart", onDragStart, false); |
| 23 window.addEventListener("drag", onDrag, false); | 23 window.addEventListener("drag", onDrag, false); |
| 24 window.addEventListener("dragend", onDragEnd, false); | 24 window.addEventListener("dragend", onDragEnd, false); |
| 25 | 25 |
| 26 $("#addButton").click(addFilters); | 26 $("#addButton").click(addFilters); |
| 27 $("#cancelButton").click(closeDialog.bind(null, false)); | 27 $("#cancelButton").click(closeDialog.bind(null, false)); |
| 28 | 28 |
| 29 // Apply jQuery UI styles | 29 // Apply jQuery UI styles |
| 30 $("button").button(); | 30 $("button").button(); |
| 31 | 31 |
| 32 ext.backgroundPage.sendMessage({ | 32 ext.backgroundPage.sendMessage( |
|
Felix Dahlke
2013/10/24 16:30:34
Opening braces should go on their own line, likewi
Sebastian Noack
2013/10/25 09:55:03
I though except for object literals, as we have he
Felix Dahlke
2013/10/25 14:43:08
Um, yes, nevermind :)
| |
| 33 { | |
| 33 type: "forward", | 34 type: "forward", |
| 34 payload: | 35 payload: |
| 35 { | 36 { |
| 36 type: "clickhide-init", | 37 type: "clickhide-init", |
| 37 width: Math.max(document.body.offsetWidth || document.body.scrollWidth), | 38 width: Math.max(document.body.offsetWidth || document.body.scrollWidth), |
| 38 height: Math.max(document.body.offsetHeight || document.body.scrollHeight) | 39 height: Math.max(document.body.offsetHeight || document.body.scrollHeight) |
| 39 } | 40 } |
| 40 }, | 41 }, |
| 41 function(response) { | 42 function(response) |
| 43 { | |
| 42 document.getElementById("filters").value = response.filters.join("\n"); | 44 document.getElementById("filters").value = response.filters.join("\n"); |
| 43 }); | 45 }); |
| 44 | 46 |
| 45 document.getElementById("filters").focus(); | 47 document.getElementById("filters").focus(); |
| 46 } | 48 } |
| 47 $(init); | 49 $(init); |
| 48 | 50 |
| 49 function onKeyDown(event) | 51 function onKeyDown(event) |
| 50 { | 52 { |
| 51 if (event.keyCode == 27) | 53 if (event.keyCode == 27) |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 114 ); | 116 ); |
| 115 dragCoords = [event.screenX, event.screenY]; | 117 dragCoords = [event.screenX, event.screenY]; |
| 116 } | 118 } |
| 117 } | 119 } |
| 118 | 120 |
| 119 function onDragEnd(event) | 121 function onDragEnd(event) |
| 120 { | 122 { |
| 121 onDrag(event); | 123 onDrag(event); |
| 122 dragCoords = null; | 124 dragCoords = null; |
| 123 } | 125 } |
| LEFT | RIGHT |