Advertisement
MeKLiN2

downthemall-BACKGROUND.JS

Feb 5th, 2025
14
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.21 KB | None | 0 0
  1. /******/ (() => { // webpackBootstrap
  2. /******/ "use strict";
  3. /******/ var __webpack_modules__ = ({
  4.  
  5. /***/ "./lib/background.ts":
  6. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  7.  
  8. var __webpack_unused_export__;
  9.  
  10. __webpack_unused_export__ = ({ value: true });
  11. // License: MIT
  12. const constants_1 = __webpack_require__("./lib/constants.ts");
  13. const api_1 = __webpack_require__("./lib/api.ts");
  14. const item_1 = __webpack_require__("./lib/item.ts");
  15. const prefs_1 = __webpack_require__("./lib/prefs.ts");
  16. const i18n_1 = __webpack_require__("./lib/i18n.ts");
  17. const windowutils_1 = __webpack_require__("./lib/windowutils.ts");
  18. const filters_1 = __webpack_require__("./lib/filters.ts");
  19. const man_1 = __webpack_require__("./lib/manager/man.ts");
  20. const browser_1 = __webpack_require__("./lib/browser.ts");
  21. const bus_1 = __webpack_require__("./lib/bus.ts");
  22. const util_1 = __webpack_require__("./lib/util.ts");
  23. const db_1 = __webpack_require__("./lib/db.ts");
  24. const menus = typeof (browser_1.menus) !== "undefined" && browser_1.menus || browser_1.contextMenus;
  25. const GATHER = "/bundles/content-gather.js";
  26. const CHROME_CONTEXTS = Object.freeze(new Set([
  27. "all",
  28. "audio",
  29. "browser_action",
  30. "editable",
  31. "frame",
  32. "image",
  33. "launcher",
  34. "link",
  35. "page",
  36. "page_action",
  37. "selection",
  38. "video",
  39. ]));
  40. async function runContentJob(tab, file, msg) {
  41. try {
  42. if (tab && tab.incognito && msg) {
  43. msg.private = tab.incognito;
  44. }
  45. const res = await browser_1.tabs.executeScript(tab.id, {
  46. file,
  47. allFrames: true,
  48. runAt: "document_start"
  49. });
  50. if (!msg) {
  51. return res;
  52. }
  53. const promises = [];
  54. const results = [];
  55. for (const frame of await browser_1.webNavigation.getAllFrames({ tabId: tab.id })) {
  56. promises.push(browser_1.tabs.sendMessage(tab.id, msg, {
  57. frameId: frame.frameId
  58. }).then(function (res) {
  59. results.push(res);
  60. }).catch(console.error));
  61. }
  62. await Promise.all(promises);
  63. return results;
  64. }
  65. catch (ex) {
  66. console.error("Failed to execute content script", file, ex.message || ex.toString(), ex);
  67. return [];
  68. }
  69. }
  70. class Handler {
  71. async processResults(turbo = false, results) {
  72. const links = this.makeUnique(results, "links");
  73. const media = this.makeUnique(results, "media");
  74. await api_1.API[turbo ? "turbo" : "regular"](links, media);
  75. }
  76. makeUnique(results, what) {
  77. return item_1.makeUniqueItems(results.filter(e => e[what]).map(e => {
  78. const finisher = new item_1.Finisher(e);
  79. return util_1.filterInSitu(e[what].
  80. map((item) => finisher.finish(item)), e => !!e);
  81. }));
  82. }
  83. async performSelection(options) {
  84. try {
  85. const tabOptions = {
  86. currentWindow: true,
  87. discarded: false,
  88. };
  89. if (!browser_1.CHROME) {
  90. tabOptions.hidden = false;
  91. }
  92. const selectedTabs = options.allTabs ?
  93. await browser_1.tabs.query(tabOptions) :
  94. [options.tab];
  95. const textLinks = await prefs_1.Prefs.get("text-links", true);
  96. const gatherOptions = {
  97. type: "DTA:gather",
  98. selectionOnly: options.selectionOnly,
  99. textLinks,
  100. schemes: Array.from(constants_1.ALLOWED_SCHEMES.values()),
  101. transferable: constants_1.TRANSFERABLE_PROPERTIES,
  102. };
  103. const results = await Promise.all(selectedTabs.
  104. map((tab) => runContentJob(tab, GATHER, gatherOptions)));
  105. await this.processResults(options.turbo, results.flat());
  106. }
  107. catch (ex) {
  108. console.error(ex.toString(), ex.stack, ex);
  109. }
  110. }
  111. }
  112. function getMajor(version) {
  113. if (!version) {
  114. return "";
  115. }
  116. const match = version.match(/^\d+\.\d+/);
  117. if (!match) {
  118. return "";
  119. }
  120. return match[0];
  121. }
  122. browser_1.runtime.onInstalled.addListener(({ reason, previousVersion }) => {
  123. const { version } = browser_1.runtime.getManifest();
  124. const major = getMajor(version);
  125. const prevMajor = getMajor(previousVersion);
  126. if (reason === "update" && major !== prevMajor) {
  127. browser_1.tabs.create({
  128. url: `https://about.downthemall.org/changelog/?cur=${major}&prev=${prevMajor}`,
  129. });
  130. }
  131. else if (reason === "install") {
  132. browser_1.tabs.create({
  133. url: `https://about.downthemall.org/4.0/?cur=${major}`,
  134. });
  135. }
  136. });
  137. i18n_1.locale.then(() => {
  138. const menuHandler = new class Menus extends Handler {
  139. constructor() {
  140. super();
  141. this.onClicked = this.onClicked.bind(this);
  142. const alls = new Map();
  143. const menuCreate = (options) => {
  144. if (browser_1.CHROME) {
  145. delete options.icons;
  146. options.contexts = options.contexts.
  147. filter((e) => CHROME_CONTEXTS.has(e));
  148. if (!options.contexts.length) {
  149. return;
  150. }
  151. }
  152. if (options.contexts.includes("all")) {
  153. alls.set(options.id, options.contexts);
  154. }
  155. menus.create(options);
  156. };
  157. menuCreate({
  158. id: "DTARegularLink",
  159. contexts: ["link"],
  160. icons: {
  161. 16: "/style/button-regular.png",
  162. 32: "/style/button-regular@2x.png",
  163. },
  164. title: i18n_1._("dta.regular.link"),
  165. });
  166. menuCreate({
  167. id: "DTATurboLink",
  168. contexts: ["link"],
  169. icons: {
  170. 16: "/style/button-turbo.png",
  171. 32: "/style/button-turbo@2x.png",
  172. },
  173. title: i18n_1._("dta.turbo.link"),
  174. });
  175. menuCreate({
  176. id: "DTARegularImage",
  177. contexts: ["image"],
  178. icons: {
  179. 16: "/style/button-regular.png",
  180. 32: "/style/button-regular@2x.png",
  181. },
  182. title: i18n_1._("dta.regular.image"),
  183. });
  184. menuCreate({
  185. id: "DTATurboImage",
  186. contexts: ["image"],
  187. icons: {
  188. 16: "/style/button-turbo.png",
  189. 32: "/style/button-turbo@2x.png",
  190. },
  191. title: i18n_1._("dta.turbo.image"),
  192. });
  193. menuCreate({
  194. id: "DTARegularMedia",
  195. contexts: ["video", "audio"],
  196. icons: {
  197. 16: "/style/button-regular.png",
  198. 32: "/style/button-regular@2x.png",
  199. },
  200. title: i18n_1._("dta.regular.media"),
  201. });
  202. menuCreate({
  203. id: "DTATurboMedia",
  204. contexts: ["video", "audio"],
  205. icons: {
  206. 16: "/style/button-turbo.png",
  207. 32: "/style/button-turbo@2x.png",
  208. },
  209. title: i18n_1._("dta.turbo.media"),
  210. });
  211. menuCreate({
  212. id: "DTARegularSelection",
  213. contexts: ["selection"],
  214. icons: {
  215. 16: "/style/button-regular.png",
  216. 32: "/style/button-regular@2x.png",
  217. },
  218. title: i18n_1._("dta.regular.selection"),
  219. });
  220. menuCreate({
  221. id: "DTATurboSelection",
  222. contexts: ["selection"],
  223. icons: {
  224. 16: "/style/button-turbo.png",
  225. 32: "/style/button-turbo@2x.png",
  226. },
  227. title: i18n_1._("dta.turbo.selection"),
  228. });
  229. menuCreate({
  230. id: "DTARegular",
  231. contexts: ["all", "browser_action", "tools_menu"],
  232. icons: {
  233. 16: "/style/button-regular.png",
  234. 32: "/style/button-regular@2x.png",
  235. },
  236. title: i18n_1._("dta.regular"),
  237. });
  238. menuCreate({
  239. id: "DTATurbo",
  240. contexts: ["all", "browser_action", "tools_menu"],
  241. icons: {
  242. 16: "/style/button-turbo.png",
  243. 32: "/style/button-turbo@2x.png",
  244. },
  245. title: i18n_1._("dta.turbo"),
  246. });
  247. menuCreate({
  248. id: "sep-1",
  249. contexts: ["all", "browser_action", "tools_menu"],
  250. type: "separator"
  251. });
  252. menuCreate({
  253. id: "DTARegularAll",
  254. contexts: ["all", "browser_action", "tools_menu"],
  255. icons: {
  256. 16: "/style/button-regular.png",
  257. 32: "/style/button-regular@2x.png",
  258. },
  259. title: i18n_1._("dta-regular-all"),
  260. });
  261. menuCreate({
  262. id: "DTATurboAll",
  263. contexts: ["all", "browser_action", "tools_menu"],
  264. icons: {
  265. 16: "/style/button-turbo.png",
  266. 32: "/style/button-turbo@2x.png",
  267. },
  268. title: i18n_1._("dta-turbo-all"),
  269. });
  270. const sep2ctx = menus.ACTION_MENU_TOP_LEVEL_LIMIT === 6 ?
  271. ["all", "tools_menu"] :
  272. ["all", "browser_action", "tools_menu"];
  273. menuCreate({
  274. id: "sep-2",
  275. contexts: sep2ctx,
  276. type: "separator"
  277. });
  278. menuCreate({
  279. id: "DTAAdd",
  280. contexts: ["all", "browser_action", "tools_menu"],
  281. icons: {
  282. 16: "/style/add.svg",
  283. 32: "/style/add.svg",
  284. 64: "/style/add.svg",
  285. 128: "/style/add.svg",
  286. },
  287. title: i18n_1._("add-download"),
  288. });
  289. menuCreate({
  290. id: "sep-3",
  291. contexts: ["all", "browser_action", "tools_menu"],
  292. type: "separator"
  293. });
  294. menuCreate({
  295. id: "DTAManager",
  296. contexts: ["all", "browser_action", "tools_menu"],
  297. icons: {
  298. 16: "/style/button-manager.png",
  299. 32: "/style/button-manager@2x.png",
  300. },
  301. title: i18n_1._("manager.short"),
  302. });
  303. menuCreate({
  304. id: "DTAPrefs",
  305. contexts: ["all", "browser_action", "tools_menu"],
  306. icons: {
  307. 16: "/style/settings.svg",
  308. 32: "/style/settings.svg",
  309. 64: "/style/settings.svg",
  310. 128: "/style/settings.svg",
  311. },
  312. title: i18n_1._("prefs.short"),
  313. });
  314. Object.freeze(alls);
  315. const adjustMenus = (v) => {
  316. for (const [id, contexts] of alls.entries()) {
  317. const adjusted = v ?
  318. contexts.filter(e => e !== "all") :
  319. contexts;
  320. menus.update(id, {
  321. contexts: adjusted
  322. });
  323. }
  324. };
  325. prefs_1.Prefs.get("hide-context", false).then((v) => {
  326. // This is the initial load, so no need to adjust when visible already
  327. if (!v) {
  328. return;
  329. }
  330. adjustMenus(v);
  331. });
  332. prefs_1.Prefs.on("hide-context", (prefs, key, value) => {
  333. adjustMenus(value);
  334. });
  335. menus.onClicked.addListener(this.onClicked);
  336. }
  337. *makeSingleItemList(url, results) {
  338. for (const result of results) {
  339. const finisher = new item_1.Finisher(result);
  340. for (const list of [result.links, result.media]) {
  341. for (const e of list) {
  342. if (e.url !== url) {
  343. continue;
  344. }
  345. const finished = finisher.finish(e);
  346. if (!finished) {
  347. continue;
  348. }
  349. yield finished;
  350. }
  351. }
  352. }
  353. }
  354. async findSingleItem(tab, url, turbo = false) {
  355. if (!url) {
  356. return;
  357. }
  358. const results = await runContentJob(tab, "/bundles/content-gather.js", {
  359. type: "DTA:gather",
  360. selectionOnly: false,
  361. schemes: Array.from(constants_1.ALLOWED_SCHEMES.values()),
  362. transferable: constants_1.TRANSFERABLE_PROPERTIES,
  363. });
  364. const found = Array.from(this.makeSingleItemList(url, results));
  365. const unique = item_1.makeUniqueItems([found]);
  366. if (!unique.length) {
  367. return;
  368. }
  369. const [item] = unique;
  370. api_1.API[turbo ? "singleTurbo" : "singleRegular"](item);
  371. }
  372. onClicked(info, tab) {
  373. if (!tab.id) {
  374. return;
  375. }
  376. const { menuItemId } = info;
  377. const { [`onClicked${menuItemId}`]: handler } = this;
  378. if (!handler) {
  379. console.error("Invalid Handler for", menuItemId);
  380. return;
  381. }
  382. const rv = handler.call(this, info, tab);
  383. if (rv && rv.catch) {
  384. rv.catch(console.error);
  385. }
  386. }
  387. async emulate(action) {
  388. const tab = await browser_1.tabs.query({
  389. active: true,
  390. currentWindow: true,
  391. });
  392. if (!tab || !tab.length) {
  393. return;
  394. }
  395. this.onClicked({
  396. menuItemId: action
  397. }, tab[0]);
  398. }
  399. async onClickedDTARegular(info, tab) {
  400. return await this.performSelection({
  401. selectionOnly: false,
  402. allTabs: false,
  403. turbo: false,
  404. tab,
  405. });
  406. }
  407. async onClickedDTARegularAll(info, tab) {
  408. return await this.performSelection({
  409. selectionOnly: false,
  410. allTabs: true,
  411. turbo: false,
  412. tab,
  413. });
  414. }
  415. async onClickedDTARegularSelection(info, tab) {
  416. return await this.performSelection({
  417. selectionOnly: true,
  418. allTabs: false,
  419. turbo: false,
  420. tab,
  421. });
  422. }
  423. async onClickedDTATurbo(info, tab) {
  424. return await this.performSelection({
  425. selectionOnly: false,
  426. allTabs: false,
  427. turbo: true,
  428. tab,
  429. });
  430. }
  431. async onClickedDTATurboAll(info, tab) {
  432. return await this.performSelection({
  433. selectionOnly: false,
  434. allTabs: true,
  435. turbo: true,
  436. tab,
  437. });
  438. }
  439. async onClickedDTATurboSelection(info, tab) {
  440. return await this.performSelection({
  441. selectionOnly: true,
  442. allTabs: false,
  443. turbo: true,
  444. tab,
  445. });
  446. }
  447. async onClickedDTARegularLink(info, tab) {
  448. if (!info.linkUrl) {
  449. return;
  450. }
  451. await this.findSingleItem(tab, info.linkUrl, false);
  452. }
  453. async onClickedDTATurboLink(info, tab) {
  454. if (!info.linkUrl) {
  455. return;
  456. }
  457. await this.findSingleItem(tab, info.linkUrl, true);
  458. }
  459. async onClickedDTARegularImage(info, tab) {
  460. if (!info.srcUrl) {
  461. return;
  462. }
  463. await this.findSingleItem(tab, info.srcUrl, false);
  464. }
  465. async onClickedDTATurboImage(info, tab) {
  466. if (!info.srcUrl) {
  467. return;
  468. }
  469. await this.findSingleItem(tab, info.srcUrl, true);
  470. }
  471. async onClickedDTARegularMedia(info, tab) {
  472. if (!info.srcUrl) {
  473. return;
  474. }
  475. await this.findSingleItem(tab, info.srcUrl, false);
  476. }
  477. async onClickedDTATurboMedia(info, tab) {
  478. if (!info.srcUrl) {
  479. return;
  480. }
  481. await this.findSingleItem(tab, info.srcUrl, true);
  482. }
  483. onClickedDTAAdd() {
  484. api_1.API.singleRegular(null);
  485. }
  486. async onClickedDTAManager() {
  487. await windowutils_1.openManager();
  488. }
  489. async onClickedDTAPrefs() {
  490. await windowutils_1.openPrefs();
  491. }
  492. }();
  493. new class Action extends Handler {
  494. constructor() {
  495. super();
  496. this.onClicked = this.onClicked.bind(this);
  497. browser_1.browserAction.onClicked.addListener(this.onClicked);
  498. prefs_1.Prefs.get("button-type", false).then(v => this.adjust(v));
  499. prefs_1.Prefs.on("button-type", (prefs, key, value) => {
  500. this.adjust(value);
  501. });
  502. }
  503. adjust(type) {
  504. browser_1.browserAction.setPopup({
  505. popup: type !== "popup" ? "" : "/windows/popup.html"
  506. });
  507. let icons;
  508. switch (type) {
  509. case "popup":
  510. icons = {
  511. 16: "/style/icon16.png",
  512. 32: "/style/icon32.png",
  513. 48: "/style/icon48.png",
  514. 64: "/style/icon64.png",
  515. 128: "/style/icon128.png",
  516. 256: "/style/icon256.png"
  517. };
  518. break;
  519. case "dta":
  520. icons = {
  521. 16: "/style/button-regular.png",
  522. 32: "/style/button-regular@2x.png",
  523. };
  524. break;
  525. case "turbo":
  526. icons = {
  527. 16: "/style/button-turbo.png",
  528. 32: "/style/button-turbo@2x.png",
  529. };
  530. break;
  531. case "manager":
  532. icons = {
  533. 16: "/style/button-manager.png",
  534. 32: "/style/button-manager@2x.png",
  535. };
  536. break;
  537. }
  538. browser_1.browserAction.setIcon({ path: icons });
  539. }
  540. async onClicked() {
  541. switch (await prefs_1.Prefs.get("button-type")) {
  542. case "popup":
  543. break;
  544. case "dta":
  545. menuHandler.emulate("DTARegular");
  546. break;
  547. case "turbo":
  548. menuHandler.emulate("DTATurbo");
  549. break;
  550. case "manager":
  551. menuHandler.emulate("DTAManager");
  552. break;
  553. }
  554. }
  555. }();
  556. bus_1.Bus.on("do-regular", () => menuHandler.emulate("DTARegular"));
  557. bus_1.Bus.on("do-regular-all", () => menuHandler.emulate("DTARegularAll"));
  558. bus_1.Bus.on("do-turbo", () => menuHandler.emulate("DTATurbo"));
  559. bus_1.Bus.on("do-turbo-all", () => menuHandler.emulate("DTATurboAll"));
  560. bus_1.Bus.on("do-single", () => api_1.API.singleRegular(null));
  561. bus_1.Bus.on("open-manager", () => windowutils_1.openManager(true));
  562. bus_1.Bus.on("open-prefs", () => windowutils_1.openPrefs());
  563. (async function init() {
  564. const urlBase = browser_1.runtime.getURL("");
  565. try {
  566. browser_1.history.onVisited.addListener(({ url }) => {
  567. if (!url || !url.startsWith(urlBase)) {
  568. return;
  569. }
  570. browser_1.history.deleteUrl({ url });
  571. });
  572. const results = await browser_1.history.search({ text: urlBase });
  573. for (const { url } of results) {
  574. if (!url) {
  575. continue;
  576. }
  577. browser_1.history.deleteUrl({ url });
  578. }
  579. }
  580. catch (ex) {
  581. console.error("Failed to clean history", ex);
  582. }
  583. if (!browser_1.CHROME) {
  584. try {
  585. const sessionRemover = async () => {
  586. for (const s of await browser_1.sessions.getRecentlyClosed()) {
  587. try {
  588. if (s.tab && s.tab.url && s.tab.sessionId) {
  589. if (s.tab.url.startsWith(urlBase)) {
  590. await browser_1.sessions.forgetClosedTab(s.tab.windowId, s.tab.sessionId);
  591. }
  592. continue;
  593. }
  594. if (!s.window || !s.window.tabs || s.window.tabs.length > 1) {
  595. continue;
  596. }
  597. const [tab] = s.window.tabs;
  598. if (tab.url.startsWith(urlBase) && s.window.sessionId) {
  599. await browser_1.sessions.forgetClosedWindow(s.window.sessionId);
  600. }
  601. }
  602. catch (ex) {
  603. console.error("failed to remove session entry", ex);
  604. }
  605. }
  606. };
  607. browser_1.sessions.onChanged.addListener(sessionRemover);
  608. await sessionRemover();
  609. }
  610. catch (ex) {
  611. console.error("failed to install session remover", ex);
  612. }
  613. }
  614. try {
  615. await db_1.DB.init();
  616. }
  617. catch (ex) {
  618. console.error("db init", ex.toString(), ex.message, ex.stack, ex);
  619. }
  620. await prefs_1.Prefs.set("last-run", new Date());
  621. await filters_1.filters();
  622. await man_1.getManager();
  623. })().catch(ex => {
  624. console.error("Failed to init components", ex.toString(), ex.stack, ex);
  625. });
  626. });
  627.  
  628.  
  629. /***/ }),
  630.  
  631. /***/ "crypto":
  632. /***/ ((module) => {
  633.  
  634. module.exports = crypto;
  635.  
  636. /***/ })
  637.  
  638. /******/ });
  639. /************************************************************************/
  640. /******/ // The module cache
  641. /******/ var __webpack_module_cache__ = {};
  642. /******/
  643. /******/ // The require function
  644. /******/ function __webpack_require__(moduleId) {
  645. /******/ // Check if module is in cache
  646. /******/ var cachedModule = __webpack_module_cache__[moduleId];
  647. /******/ if (cachedModule !== undefined) {
  648. /******/ return cachedModule.exports;
  649. /******/ }
  650. /******/ // Create a new module (and put it into the cache)
  651. /******/ var module = __webpack_module_cache__[moduleId] = {
  652. /******/ // no module.id needed
  653. /******/ // no module.loaded needed
  654. /******/ exports: {}
  655. /******/ };
  656. /******/
  657. /******/ // Execute the module function
  658. /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  659. /******/
  660. /******/ // Return the exports of the module
  661. /******/ return module.exports;
  662. /******/ }
  663. /******/
  664. /******/ // expose the modules object (__webpack_modules__)
  665. /******/ __webpack_require__.m = __webpack_modules__;
  666. /******/
  667. /************************************************************************/
  668. /******/ /* webpack/runtime/chunk loaded */
  669. /******/ (() => {
  670. /******/ var deferred = [];
  671. /******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
  672. /******/ if(chunkIds) {
  673. /******/ priority = priority || 0;
  674. /******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
  675. /******/ deferred[i] = [chunkIds, fn, priority];
  676. /******/ return;
  677. /******/ }
  678. /******/ var notFulfilled = Infinity;
  679. /******/ for (var i = 0; i < deferred.length; i++) {
  680. /******/ var [chunkIds, fn, priority] = deferred[i];
  681. /******/ var fulfilled = true;
  682. /******/ for (var j = 0; j < chunkIds.length; j++) {
  683. /******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
  684. /******/ chunkIds.splice(j--, 1);
  685. /******/ } else {
  686. /******/ fulfilled = false;
  687. /******/ if(priority < notFulfilled) notFulfilled = priority;
  688. /******/ }
  689. /******/ }
  690. /******/ if(fulfilled) {
  691. /******/ deferred.splice(i--, 1)
  692. /******/ var r = fn();
  693. /******/ if (r !== undefined) result = r;
  694. /******/ }
  695. /******/ }
  696. /******/ return result;
  697. /******/ };
  698. /******/ })();
  699. /******/
  700. /******/ /* webpack/runtime/define property getters */
  701. /******/ (() => {
  702. /******/ // define getter functions for harmony exports
  703. /******/ __webpack_require__.d = (exports, definition) => {
  704. /******/ for(var key in definition) {
  705. /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
  706. /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
  707. /******/ }
  708. /******/ }
  709. /******/ };
  710. /******/ })();
  711. /******/
  712. /******/ /* webpack/runtime/hasOwnProperty shorthand */
  713. /******/ (() => {
  714. /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
  715. /******/ })();
  716. /******/
  717. /******/ /* webpack/runtime/make namespace object */
  718. /******/ (() => {
  719. /******/ // define __esModule on exports
  720. /******/ __webpack_require__.r = (exports) => {
  721. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  722. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  723. /******/ }
  724. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  725. /******/ };
  726. /******/ })();
  727. /******/
  728. /******/ /* webpack/runtime/jsonp chunk loading */
  729. /******/ (() => {
  730. /******/ // no baseURI
  731. /******/
  732. /******/ // object to store loaded and loading chunks
  733. /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
  734. /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
  735. /******/ var installedChunks = {
  736. /******/ "background": 0
  737. /******/ };
  738. /******/
  739. /******/ // no chunk on demand loading
  740. /******/
  741. /******/ // no prefetching
  742. /******/
  743. /******/ // no preloaded
  744. /******/
  745. /******/ // no HMR
  746. /******/
  747. /******/ // no HMR manifest
  748. /******/
  749. /******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
  750. /******/
  751. /******/ // install a JSONP callback for chunk loading
  752. /******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
  753. /******/ var [chunkIds, moreModules, runtime] = data;
  754. /******/ // add "moreModules" to the modules object,
  755. /******/ // then flag all "chunkIds" as loaded and fire callback
  756. /******/ var moduleId, chunkId, i = 0;
  757. /******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
  758. /******/ for(moduleId in moreModules) {
  759. /******/ if(__webpack_require__.o(moreModules, moduleId)) {
  760. /******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
  761. /******/ }
  762. /******/ }
  763. /******/ if(runtime) var result = runtime(__webpack_require__);
  764. /******/ }
  765. /******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
  766. /******/ for(;i < chunkIds.length; i++) {
  767. /******/ chunkId = chunkIds[i];
  768. /******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
  769. /******/ installedChunks[chunkId][0]();
  770. /******/ }
  771. /******/ installedChunks[chunkId] = 0;
  772. /******/ }
  773. /******/ return __webpack_require__.O(result);
  774. /******/ }
  775. /******/
  776. /******/ var chunkLoadingGlobal = self["webpackChunkdtalite"] = self["webpackChunkdtalite"] || [];
  777. /******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
  778. /******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
  779. /******/ })();
  780. /******/
  781. /************************************************************************/
  782. /******/
  783. /******/ // startup
  784. /******/ // Load entry module and return exports
  785. /******/ // This entry module depends on other loaded chunks and execution need to be delayed
  786. /******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["common"], () => (__webpack_require__("./lib/background.ts")))
  787. /******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
  788. /******/
  789. /******/ })()
  790. ;
  791. //# sourceMappingURL=background.js.map
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement