| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 333 event.preventDefault(); | 333 event.preventDefault(); |
| 334 return; | 334 return; |
| 335 } | 335 } |
| 336 | 336 |
| 337 function setMultilineContent(box, text) | 337 function setMultilineContent(box, text) |
| 338 { | 338 { |
| 339 while (box.firstChild) | 339 while (box.firstChild) |
| 340 box.removeChild(box.firstChild); | 340 box.removeChild(box.firstChild); |
| 341 | 341 |
| 342 let lines = text.match(/.{1,80}/g); | 342 let lines = text.match(/.{1,80}/g); |
| 343 if (lines.length > 6) | 343 if (lines.length > 7) |
|
Erik
2016/01/29 04:29:31
I think this should be `if (lines.length > 7)` si
Thomas Greiner
2016/01/29 18:28:55
Done. I agree that the maximum of 482 characters t
| |
| 344 { | 344 { |
| 345 // Text is too long to display in full so we cut out the middle part | 345 // Text is too long to display in full so we cut out the middle part |
| 346 lines = lines.slice(0,3).concat("\u2026", lines.slice(-3)); | 346 lines = lines.slice(0,3).concat("\u2026", lines.slice(-3)); |
| 347 } | 347 } |
| 348 | 348 |
| 349 for (let line of lines) | 349 for (let line of lines) |
| 350 { | 350 { |
| 351 let description = document.createElement("description"); | 351 let description = document.createElement("description"); |
| 352 description.setAttribute("value", line); | 352 description.setAttribute("value", line); |
| 353 box.appendChild(description); | 353 box.appendChild(description); |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 555 return; | 555 return; |
| 556 | 556 |
| 557 this.deleteItems(this.dragItems); | 557 this.deleteItems(this.dragItems); |
| 558 } | 558 } |
| 559 }; | 559 }; |
| 560 | 560 |
| 561 window.addEventListener("load", function() | 561 window.addEventListener("load", function() |
| 562 { | 562 { |
| 563 FilterActions.init(); | 563 FilterActions.init(); |
| 564 }, false); | 564 }, false); |
| LEFT | RIGHT |