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

Side by Side Diff: chrome/content/ui/sendReport.js

Issue 29333389: Issue 3502 - Don`t use expression closures in Issue Reporter (Closed)
Patch Set: Created Jan. 12, 2016, 3:52 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 | « no previous file | 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 /* 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-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 let image = new Image(); 374 let image = new Image();
375 image.src = screenshot; 375 image.src = screenshot;
376 image.addEventListener("load", () => { 376 image.addEventListener("load", () => {
377 canvas.width = image.width + this.imageOffset * 2; 377 canvas.width = image.width + this.imageOffset * 2;
378 canvas.height = image.height + this.imageOffset * 2; 378 canvas.height = image.height + this.imageOffset * 2;
379 context.drawImage(image, this.imageOffset, this.imageOffset); 379 context.drawImage(image, this.imageOffset, this.imageOffset);
380 }); 380 });
381 } 381 }
382 }, 382 },
383 383
384 get enabled() this._enabled, 384 get enabled()
385 {
386 return this._enabled
Thomas Greiner 2016/01/12 16:02:02 Detail: Missing semicolon (same below)
Wladimir Palant 2016/01/12 17:14:42 Done.
387 },
385 set enabled(enabled) 388 set enabled(enabled)
386 { 389 {
387 if (this._enabled == enabled) 390 if (this._enabled == enabled)
388 return; 391 return;
389 392
390 this._enabled = enabled; 393 this._enabled = enabled;
391 this._canvas.style.opacity = this._enabled ? "" : "0.3" 394 this._canvas.style.opacity = this._enabled ? "" : "0.3"
392 E("screenshotMarkButton").disabled = !this._enabled; 395 E("screenshotMarkButton").disabled = !this._enabled;
393 E("screenshotRemoveButton").disabled = !this._enabled; 396 E("screenshotRemoveButton").disabled = !this._enabled;
394 E("screenshotUndoButton").disabled = !this._enabled || !this._undoQueue.leng th; 397 E("screenshotUndoButton").disabled = !this._enabled || !this._undoQueue.leng th;
395 }, 398 },
396 399
397 get selectionType() this._selectionType, 400 get selectionType()
401 {
402 return this._selectionType
403 },
398 set selectionType(type) 404 set selectionType(type)
399 { 405 {
400 if (this._selectionType == type) 406 if (this._selectionType == type)
401 return; 407 return;
402 408
403 // Abort selection already in progress 409 // Abort selection already in progress
404 this.abortSelection(); 410 this.abortSelection();
405 411
406 this._selectionType = type; 412 this._selectionType = type;
407 }, 413 },
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1547 1553
1548 function censorURL(url) 1554 function censorURL(url)
1549 { 1555 {
1550 return url.replace(/([?;&\/#][^?;&\/#]+?=)[^?;&\/#]+/g, "$1*"); 1556 return url.replace(/([?;&\/#][^?;&\/#]+?=)[^?;&\/#]+/g, "$1*");
1551 } 1557 }
1552 1558
1553 function encodeHTML(str) 1559 function encodeHTML(str)
1554 { 1560 {
1555 return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"). replace(/"/g, "&quot;"); 1561 return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"). replace(/"/g, "&quot;");
1556 } 1562 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld