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

Delta Between Two Patch Sets: include.preload.js

Issue 29347034: Issue 1727 - Prevent circumvention via WebSocket (Closed)
Left Patch Set: Added newlines Created Aug. 10, 2016, 4:17 p.m.
Right Patch Set: Don't hardcode connection state values Created Aug. 10, 2016, 4:25 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | lib/requestBlocker.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 checkRequest(websocket.url, function(blocked) 449 checkRequest(websocket.url, function(blocked)
450 { 450 {
451 if (blocked) 451 if (blocked)
452 closeWebSocket(websocket); 452 closeWebSocket(websocket);
453 }); 453 });
454 454
455 return websocket; 455 return websocket;
456 }.bind(); 456 }.bind();
457 457
458 Object.defineProperties(WebSocket, { 458 Object.defineProperties(WebSocket, {
459 CONNECTING: {value: 0, enumerable: true}, 459 CONNECTING: {value: RealWebSocket.CONNECTING, enumerable: true},
460 OPEN: {value: 1, enumerable: true}, 460 OPEN: {value: RealWebSocket.OPEN, enumerable: true},
461 CLOSING: {value: 2, enumerable: true}, 461 CLOSING: {value: RealWebSocket.CLOSING, enumerable: true},
462 CLOSED: {value: 3, enumerable: true}, 462 CLOSED: {value: RealWebSocket.CLOSED, enumerable: true},
463 prototype: {value: RealWebSocket.prototype} 463 prototype: {value: RealWebSocket.prototype}
464 }); 464 });
465 465
466 RealWebSocket.prototype.constructor = WebSocket; 466 RealWebSocket.prototype.constructor = WebSocket;
467 }, eventName); 467 }, eventName);
468 } 468 }
469 469
470 function init(document) 470 function init(document)
471 { 471 {
472 var shadow = null; 472 var shadow = null;
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 }, true); 639 }, true);
640 640
641 return updateStylesheet; 641 return updateStylesheet;
642 } 642 }
643 643
644 if (document instanceof HTMLDocument) 644 if (document instanceof HTMLDocument)
645 { 645 {
646 checkSitekey(); 646 checkSitekey();
647 window.updateStylesheet = init(document); 647 window.updateStylesheet = init(document);
648 } 648 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld