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

Side by Side Diff: background.js

Issue 29544706: Noissue - Adapt check for devtools panel support for Firefox (Closed)
Patch Set: Use compareVersion from coreUtils Created Sept. 18, 2017, 6:20 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 | messageResponder.js » ('j') | 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-present eyeo GmbH 3 * Copyright (C) 2006-present 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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 updateFromURL(modules.info); 394 updateFromURL(modules.info);
395 395
396 modules.subscriptionInit = { 396 modules.subscriptionInit = {
397 reinitialized: params.filterlistsReinitialized 397 reinitialized: params.filterlistsReinitialized
398 }; 398 };
399 399
400 modules.messaging = { 400 modules.messaging = {
401 port: new EventEmitter() 401 port: new EventEmitter()
402 }; 402 };
403 403
404 modules.coreUtils = {
405 compareVersion(v1, v2)
406 {
407 return parseFloat(v1) - parseFloat(v2);
408 }
409 };
410
404 window.addEventListener("message", (event) => 411 window.addEventListener("message", (event) =>
405 { 412 {
406 if (event.data.type != "message") 413 if (event.data.type != "message")
407 return; 414 return;
408 let message = event.data.payload; 415 let message = event.data.payload;
409 let {messageId} = event.data; 416 let {messageId} = event.data;
410 let sender = { 417 let sender = {
411 page: new ext.Page(event.source) 418 page: new ext.Page(event.source)
412 }; 419 };
413 420
(...skipping 24 matching lines...) Expand all
438 } 445 }
439 ); 446 );
440 } 447 }
441 else if (typeof response != "undefined") 448 else if (typeof response != "undefined")
442 { 449 {
443 reply(response); 450 reply(response);
444 } 451 }
445 } 452 }
446 }); 453 });
447 454
448 window.Services = {
449 vc: {
450 compare(v1, v2)
451 {
452 return parseFloat(v1) - parseFloat(v2);
453 }
454 }
455 };
456
457 let filters = [ 455 let filters = [
458 "@@||alternate.de^$document", 456 "@@||alternate.de^$document",
459 "@@||der.postillion.com^$document", 457 "@@||der.postillion.com^$document",
460 "@@||taz.de^$document", 458 "@@||taz.de^$document",
461 "@@||amazon.de^$document", 459 "@@||amazon.de^$document",
462 "||biglemon.am/bg_poster/banner.jpg", 460 "||biglemon.am/bg_poster/banner.jpg",
463 "winfuture.de###header_logo_link", 461 "winfuture.de###header_logo_link",
464 "###WerbungObenRechts10_GesamtDIV", 462 "###WerbungObenRechts10_GesamtDIV",
465 "###WerbungObenRechts8_GesamtDIV", 463 "###WerbungObenRechts8_GesamtDIV",
466 "###WerbungObenRechts9_GesamtDIV", 464 "###WerbungObenRechts9_GesamtDIV",
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 }, 601 },
604 filter: { 602 filter: {
605 text: "||example.com/some-annoying-popup$popup", 603 text: "||example.com/some-annoying-popup$popup",
606 whitelisted: false, 604 whitelisted: false,
607 userDefined: true, 605 userDefined: true,
608 subscription: null 606 subscription: null
609 } 607 }
610 }); 608 });
611 }); 609 });
612 }()); 610 }());
OLDNEW
« no previous file with comments | « no previous file | messageResponder.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld