OLD | NEW |
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-2017 eyeo GmbH | 3 * Copyright (C) 2006-2017 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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 "synchronize_checksum_mismatch": "filters_subscription_lastDownload_check
sumMismatch" | 430 "synchronize_checksum_mismatch": "filters_subscription_lastDownload_check
sumMismatch" |
431 }; | 431 }; |
432 if (downloadStatus in map) | 432 if (downloadStatus in map) |
433 lastUpdate.textContent = i18n.getMessage(map[downloadStatus]); | 433 lastUpdate.textContent = i18n.getMessage(map[downloadStatus]); |
434 else | 434 else |
435 lastUpdate.textContent = downloadStatus; | 435 lastUpdate.textContent = downloadStatus; |
436 lastUpdate.classList.add("error"); | 436 lastUpdate.classList.add("error"); |
437 } | 437 } |
438 else if (subscription.lastDownload > 0) | 438 else if (subscription.lastDownload > 0) |
439 { | 439 { |
440 let timeDate = i18n_timeDateStrings(subscription.lastDownload * 1000); | 440 let timeDate = i18nTimeDateStrings(subscription.lastDownload * 1000); |
441 let messageID = (timeDate[1] ? "last_updated_at" : "last_updated_at_today"); | 441 let messageID = (timeDate[1] ? "last_updated_at" : "last_updated_at_today"); |
442 lastUpdate.textContent = i18n.getMessage(messageID, timeDate); | 442 lastUpdate.textContent = i18n.getMessage(messageID, timeDate); |
443 } | 443 } |
444 } | 444 } |
445 | 445 |
446 function onSubscriptionMessage(action, subscription) | 446 function onSubscriptionMessage(action, subscription) |
447 { | 447 { |
448 let element = findSubscriptionElement(subscription); | 448 let element = findSubscriptionElement(subscription); |
449 | 449 |
450 switch (action) | 450 switch (action) |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 onFilterMessage(message.action, message.args[0]); | 721 onFilterMessage(message.action, message.args[0]); |
722 break; | 722 break; |
723 case "prefs.respond": | 723 case "prefs.respond": |
724 onPrefMessage(message.action, message.args[0]); | 724 onPrefMessage(message.action, message.args[0]); |
725 break; | 725 break; |
726 case "subscriptions.respond": | 726 case "subscriptions.respond": |
727 onSubscriptionMessage(message.action, message.args[0]); | 727 onSubscriptionMessage(message.action, message.args[0]); |
728 break; | 728 break; |
729 } | 729 } |
730 }); | 730 }); |
OLD | NEW |