diff --git a/js/github_navigation.js b/js/github_navigation.js index a234348..66c91e9 100644 --- a/js/github_navigation.js +++ b/js/github_navigation.js @@ -1,26 +1,26 @@ -let observer = new MutationObserver(mutationCallback); - -let options = { - attributes: true, - attributeOldValue: true, - attributeFilter: ['class'], - subtree: true -}; - -function mutationCallback(mutations) { - for (let mutation of mutations) { - if (mutation.type === "attributes") { - let target = mutation.target; - - if (target.nodeName === "a") { - if (util.checkUrl(target.href) === true) { - if (target.className.includes("selected")) { - util.setDefaults(); - } - } - } - } - } -} - +let observer = new MutationObserver(mutationCallback); + +let options = { + attributes: true, + attributeOldValue: true, + attributeFilter: ['class'], + subtree: true +}; + +function mutationCallback(mutations) { + for (let mutation of mutations) { + if (mutation.type === "attributes") { + let target = mutation.target; + + if (target.nodeName === "a") { + if (util.checkUrl(target.href) === true) { + if (target.className.includes("selected")) { + util.setDefaults(); + } + } + } + } + } +} + observer.observe(document, options); \ No newline at end of file diff --git a/js/options.js b/js/options.js index b448a1a..bacd0b4 100644 --- a/js/options.js +++ b/js/options.js @@ -1,87 +1,87 @@ -let page = document.getElementById('buttonDiv'); - -let sliderMap = []; -sliderMap.push({ key: "autoExpand", value: "Auto Expand" }); -//sliderMap.push({ key: "autoHideResolved", value: "Auto Hide Resolved" }); -//sliderMap.push({ key: "autoHideCommits", value: "Auto Hide Commits" }); - -function constructSliders() -{ - let body = document.querySelector("body > div.allContainer"); - for (let item of sliderMap) - { - let container = document.createElement("div"); - container.className = "container"; - let label = document.createElement("label"); - label.setAttribute("for", item.key); - label.innerText = item.value; - - let slider = document.createElement("label"); - slider.id = item.key; - slider.className = "switch"; - - let checkbox = document.createElement("input"); - checkbox.type = "checkbox"; - - let span = document.createElement("span"); - span.className = "slider round"; - - slider.appendChild(checkbox); - slider.appendChild(span); - slider.addEventListener("click", save); - - container.appendChild(label); - container.appendChild(slider); - body.appendChild(container); - getAndAssignValue(item.key); - } -} - -function save() -{ - let saveObject = getSaveObject(); - - chrome.storage.sync.set(saveObject, function () { - console.log("Saved."); - }); -} - -function getSaveObject() -{ - let autoExpandCheckbox = document.querySelector("#autoExpand > input[type='checkbox']"); - let autoHideResolvedCheckbox = document.querySelector("#autoHideResolved > input[type='checkbox']"); - let autoHideCommitsCheckbox = document.querySelector("#autoHideCommits > input[type='checkbox']"); - - let retValue = { - autoExpand: autoExpandCheckbox.checked, - autoHideResolved: autoHideResolvedCheckbox.checked, - autoHideCommits: autoHideCommitsCheckbox.checked - }; - - return retValue; -} - -function getAndAssignValue(key) -{ - console.log("Getting: " + key); - chrome.storage.sync.get(key, function (val) - { - console.log(val); - let checkbox = document.querySelector("#" + key + " > input[type='checkbox']"); - - switch (key) - { - case "autoExpand": - checkbox.checked = val.autoExpand; - break; - case "autoHideResolved": - checkbox.checked = val.autoHideResolved; - break; - case "autoHideCommits": - checkbox.checked = val.autoHideCommits; - break; - } - }); -} - -constructSliders(); +let page = document.getElementById('buttonDiv'); + +let sliderMap = []; +sliderMap.push({ key: "autoExpand", value: "Auto Expand" }); +//sliderMap.push({ key: "autoHideResolved", value: "Auto Hide Resolved" }); +//sliderMap.push({ key: "autoHideCommits", value: "Auto Hide Commits" }); + +function constructSliders() +{ + let body = document.querySelector("body > div.allContainer"); + for (let item of sliderMap) + { + let container = document.createElement("div"); + container.className = "container"; + let label = document.createElement("label"); + label.setAttribute("for", item.key); + label.innerText = item.value; + + let slider = document.createElement("label"); + slider.id = item.key; + slider.className = "switch"; + + let checkbox = document.createElement("input"); + checkbox.type = "checkbox"; + + let span = document.createElement("span"); + span.className = "slider round"; + + slider.appendChild(checkbox); + slider.appendChild(span); + slider.addEventListener("click", save); + + container.appendChild(label); + container.appendChild(slider); + body.appendChild(container); + getAndAssignValue(item.key); + } +} + +function save() +{ + let saveObject = getSaveObject(); + + chrome.storage.sync.set(saveObject, function () { + console.log("Saved."); + }); +} + +function getSaveObject() +{ + let autoExpandCheckbox = document.querySelector("#autoExpand > input[type='checkbox']"); + let autoHideResolvedCheckbox = document.querySelector("#autoHideResolved > input[type='checkbox']"); + let autoHideCommitsCheckbox = document.querySelector("#autoHideCommits > input[type='checkbox']"); + + let retValue = { + autoExpand: autoExpandCheckbox.checked, + autoHideResolved: autoHideResolvedCheckbox.checked, + autoHideCommits: autoHideCommitsCheckbox.checked + }; + + return retValue; +} + +function getAndAssignValue(key) +{ + console.log("Getting: " + key); + chrome.storage.sync.get(key, function (val) + { + console.log(val); + let checkbox = document.querySelector("#" + key + " > input[type='checkbox']"); + + switch (key) + { + case "autoExpand": + checkbox.checked = val.autoExpand; + break; + case "autoHideResolved": + checkbox.checked = val.autoHideResolved; + break; + case "autoHideCommits": + checkbox.checked = val.autoHideCommits; + break; + } + }); +} + +constructSliders(); diff --git a/js/popup.js b/js/popup.js index b69e104..4236af0 100644 --- a/js/popup.js +++ b/js/popup.js @@ -1,76 +1,76 @@ -let expandButton = document.getElementById("expandButton"); -let hideResolvedButton = document.getElementById("hideResolvedButton"); -let showResolvedButton = document.getElementById("showResolvedButton"); -let hideCommitsButton = document.getElementById("hideCommitsButton"); -let showCommitsButton = document.getElementById("showCommitsButton"); -let hideStatusesButton = document.getElementById("hideStatusesButton"); -let showStatusesButton = document.getElementById("showStatusesButton"); -let hideCommentsButton = document.getElementById("hideCommentsButton"); -let showCommentsButton = document.getElementById("showCommentsButton"); - -let refreshButton = document.getElementById('refreshButton'); - -expandButton.onclick = function(element) -{ - util.expandAll(); -}; - -hideResolvedButton.onclick = function(element) -{ - util.hideResolved(); -}; - -showResolvedButton.onclick = function (event) -{ - util.showResolved(); -}; - -hideCommitsButton.onclick = function (event) -{ - util.hideCommits(); -}; - -showCommitsButton.onclick = function (event) -{ - util.showCommits(); -}; - -hideStatusesButton.onclick = function (event) -{ - util.hideStatuses(); -}; - -showStatusesButton.onclick = function (event) -{ - util.showStatuses(); -}; - -hideCommentsButton.onclick = function (event) -{ - util.hideComments(); -}; - -showCommentsButton.onclick = function (event) -{ - util.showComments(); -}; - -refreshButton.onclick = function (event) -{ - refresh(event); -}; - -async function refresh(event) -{ - chrome.tabs.query({ active: true, lastFocusedWindow: true }, tabs => { - let url = tabs[0].url; - util.autoApplyItems(url); - }); - - event.target.className += " spin"; - await sleep(500); - chrome.extension.getBackgroundPage().window.location.reload(); - window.location.reload(); -} - +let expandButton = document.getElementById("expandButton"); +let hideResolvedButton = document.getElementById("hideResolvedButton"); +let showResolvedButton = document.getElementById("showResolvedButton"); +let hideCommitsButton = document.getElementById("hideCommitsButton"); +let showCommitsButton = document.getElementById("showCommitsButton"); +let hideStatusesButton = document.getElementById("hideStatusesButton"); +let showStatusesButton = document.getElementById("showStatusesButton"); +let hideCommentsButton = document.getElementById("hideCommentsButton"); +let showCommentsButton = document.getElementById("showCommentsButton"); + +let refreshButton = document.getElementById('refreshButton'); + +expandButton.onclick = function(element) +{ + util.expandAll(); +}; + +hideResolvedButton.onclick = function(element) +{ + util.hideResolved(); +}; + +showResolvedButton.onclick = function (event) +{ + util.showResolved(); +}; + +hideCommitsButton.onclick = function (event) +{ + util.hideCommits(); +}; + +showCommitsButton.onclick = function (event) +{ + util.showCommits(); +}; + +hideStatusesButton.onclick = function (event) +{ + util.hideStatuses(); +}; + +showStatusesButton.onclick = function (event) +{ + util.showStatuses(); +}; + +hideCommentsButton.onclick = function (event) +{ + util.hideComments(); +}; + +showCommentsButton.onclick = function (event) +{ + util.showComments(); +}; + +refreshButton.onclick = function (event) +{ + refresh(event); +}; + +async function refresh(event) +{ + chrome.tabs.query({ active: true, lastFocusedWindow: true }, tabs => { + let url = tabs[0].url; + util.autoApplyItems(url); + }); + + event.target.className += " spin"; + await sleep(500); + chrome.extension.getBackgroundPage().window.location.reload(); + window.location.reload(); +} + document.onload \ No newline at end of file diff --git a/js/service_worker.js b/js/service_worker.js new file mode 100644 index 0000000..684c349 --- /dev/null +++ b/js/service_worker.js @@ -0,0 +1,27 @@ +chrome.runtime.onInstalled.addListener(function() +{ + chrome.declarativeContent.onPageChanged.removeRules(undefined, function() + { + chrome.declarativeContent.onPageChanged.addRules([{ + conditions: [new chrome.declarativeContent.PageStateMatcher({ + pageUrl: { hostEquals: 'github.com' }, + })], + actions: [new chrome.declarativeContent.ShowPageAction()] + }]); + }); + + let eventList = ['onCompleted', 'onReferenceFragmentUpdated', 'onTabReplaced', 'onHistoryStateUpdated']; + + eventList.forEach(function (e) { + chrome.webNavigation[e].addListener(function (event) { + util.autoApplyItems(event.url); + }); + }); + + chrome.tabs.onActivated.addListener(function (event) { + chrome.tabs.get(event.tabId, function (tab) + { + util.autoApplyItems(tab.url); + }); + }); +}); diff --git a/js/util.js b/js/util.js index 65ddd18..a52a22e 100644 --- a/js/util.js +++ b/js/util.js @@ -1,138 +1,175 @@ -const sleep = (delay) => new Promise((resolve) => setTimeout(resolve, delay)); - -let expandAllCounter = 0; - -var util = { - expandAll: function () { - chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) { - let codeText = `const sleep` + (expandAllCounter) + ` = (delay) => new Promise((resolve) => setTimeout(resolve, delay)); - - async function Expand() { - var elements = document.querySelectorAll("button.ajax-pagination-btn[type='submit'][data-disable-with]"); - var counter = 1; - - while (elements.length > 0) - { - console.log("Expansion round " + counter++); - - for (var i = 0; i < elements.length; i++) - { - elements[i].click(); - } - - await sleep` + (expandAllCounter) + `(3000); - console.log("Refreshing elements...");; - elements = document.querySelectorAll('button.ajax-pagination-btn[type="submit"][data-disable-with]'); - } - - console.log("Complete!"); - } - - Expand();`; - - chrome.tabs.executeScript(tabs[0].id, { code: codeText }); - expandAllCounter++; - }); - }, - hideResolved: function() { - chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) { - let codeText = `var elements = document.querySelectorAll("details[data-resolved='true']"); - elements.forEach(function(element) { element.setAttribute("style", "display: none !important;"); });`; - - chrome.tabs.executeScript(tabs[0].id, { code: codeText }); - }); - }, - showResolved: function() { - chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) { - let codeText = `var elements = document.querySelectorAll("details[data-resolved='true']"); - elements.forEach(function(element) { element.removeAttribute("style"); });`; - - chrome.tabs.executeScript(tabs[0].id, { code: codeText }); - }); - }, - hideCommits: function() { - chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) { - let codeText = `var elements = document.querySelectorAll("div.js-commit-group"); - elements.forEach(function(element) { element.setAttribute("style", "display: none !important;"); });`; - - chrome.tabs.executeScript(tabs[0].id, { code: codeText }); - }); - }, - showCommits: function() { - chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) { - let codeText = `var elements = document.querySelectorAll("div.js-commit-group"); - elements.forEach(function(element) { element.removeAttribute("style"); });`; - - chrome.tabs.executeScript(tabs[0].id, { code: codeText }); - }); - }, - hideStatuses: function() { - chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) { - let codeText = `var elements = document.querySelectorAll(".js-timeline-item .TimelineItem[data-team-hovercards-enabled]:not([data-url]), .js-timeline-item > div > div[id|=pullrequestreview] > .TimelineItem:not([data-url]), .js-timeline-item > .TimelineItem:not([data-url]) > span.TimelineItem-badge.bg-blue.text-white") - elements.forEach(function(element) { element.setAttribute("style", "display: none !important;"); });`; - - chrome.tabs.executeScript(tabs[0].id, { code: codeText }); - }); - }, - showStatuses: function() { - chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) { - let codeText = `var elements = document.querySelectorAll(".js-timeline-item .TimelineItem[data-team-hovercards-enabled]:not([data-url]), .js-timeline-item > div > div[id|=pullrequestreview] > .TimelineItem:not([data-url]), .js-timeline-item > .TimelineItem:not([data-url]) > span.TimelineItem-badge.bg-blue.text-white") - elements.forEach(function(element) { element.removeAttribute("style"); });`; - - chrome.tabs.executeScript(tabs[0].id, { code: codeText }); - }); - }, - hideComments: function() { - chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) { - let codeText = `var elements = document.querySelectorAll(".TimelineItem.js-comment-container, .TimelineItem > .timeline-comment-group") - elements.forEach(function(element) { element.setAttribute("style", "display: none !important;"); });`; - - chrome.tabs.executeScript(tabs[0].id, { code: codeText }); - }); - }, - showComments: function() { - chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) { - let codeText = `var elements = document.querySelectorAll(".TimelineItem.js-comment-container, .TimelineItem > .timeline-comment-group") - elements.forEach(function(element) { element.removeAttribute("style"); });`; - - chrome.tabs.executeScript(tabs[0].id, { code: codeText }); - }); - }, - checkUrl: function(url) { - var pattern = "^https?:\\/\\/github.com\\/[^\\/]+\\/[^\\/]+\\/pull\\/(\\d+)"; - var regex = new RegExp(pattern); - var result = regex.test(url); - return result; - }, - autoApplyItems: function(currentUrl) { - let result = util.checkUrl(currentUrl); - - if (result === true) { - util.setDefaults(); - } - }, - setDefaults: function() { - chrome.storage.sync.get("autoExpand", function (val) { - if (val.autoExpand === true){ - util.expandAll(); - } - - //setTimeout(function() { util.setHideCommits() }, 15000); - //setTimeout(function () { util.setHideResolved() }, 15000); - }); - }, - setHideCommits: function() { - chrome.storage.sync.get("hideCommits", function (val2) { - if (val2.hideCommits === true) { - util.hideCommits(); - } - }); - }, - setHideResolved: function() { - chrome.storage.sync.get("hideResolved", function (val3) { - if (val3.hideResolved === true) { - util.hideResolved(); - } - }); - } -}; \ No newline at end of file +const sleep = (delay) => new Promise((resolve) => setTimeout(resolve, delay)); + +var util = { + expandAll: function () { + chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) { + chrome.scripting.executeScript({ target: {tabId: tabs[0].id}, func: NewUtil.Expand }); + }); + }, + hideResolved: function() { + chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) { + chrome.scripting.executeScript({ target: {tabId: tabs[0].id}, func: NewUtil.HideResolved }); + }); + }, + showResolved: function() { + chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) { + chrome.scripting.executeScript({ target: {tabId: tabs[0].id}, func: NewUtil.ShowResolved }); + }); + }, + hideCommits: function() { + chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) { + chrome.scripting.executeScript({ target: {tabId: tabs[0].id}, func: NewUtil.HideCommits }); + }); + }, + showCommits: function() { + chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) { + chrome.scripting.executeScript({ target: {tabId: tabs[0].id}, func: NewUtil.ShowCommits }); + }); + }, + hideStatuses: function() { + chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) { + chrome.scripting.executeScript({ target: {tabId: tabs[0].id}, func: NewUtil.HideStatuses }); + }); + }, + showStatuses: function() { + chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) { + chrome.scripting.executeScript({ target: {tabId: tabs[0].id}, func: NewUtil.ShowStatuses }); + }); + }, + hideComments: function() { + chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) { + chrome.scripting.executeScript({ target: {tabId: tabs[0].id}, func: NewUtil.HideComments }); + }); + }, + showComments: function() { + chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) { + chrome.scripting.executeScript({ target: {tabId: tabs[0].id}, func: NewUtil.ShowComments }); + }); + }, + checkUrl: function(url) { + var pattern = "^https?:\\/\\/github.com\\/[^\\/]+\\/[^\\/]+\\/pull\\/(\\d+)"; + var regex = new RegExp(pattern); + var result = regex.test(url); + return result; + }, + autoApplyItems: function(currentUrl) { + let result = util.checkUrl(currentUrl); + + if (result === true) { + util.setDefaults(); + } + }, + setDefaults: function() { + chrome.storage.sync.get("autoExpand", function (val) { + if (val.autoExpand === true){ + util.expandAll(); + } + + //setTimeout(function() { util.setHideCommits() }, 15000); + //setTimeout(function () { util.setHideResolved() }, 15000); + }); + }, + setHideCommits: function() { + chrome.storage.sync.get("hideCommits", function (val2) { + if (val2.hideCommits === true) { + util.hideCommits(); + } + }); + }, + setHideResolved: function() { + chrome.storage.sync.get("hideResolved", function (val3) { + if (val3.hideResolved === true) { + util.hideResolved(); + } + }); + } +}; + + +var NewUtil = (function () { + 'use strict'; + + async function Expand() + { + let elements = document.querySelectorAll("button.ajax-pagination-btn[type='submit'][data-disable-with]"); + let counter = 1; + + while (elements.length > 0) + { + console.log("Expansion round " + counter++); + + for (let i = 0; i < elements.length; i++) + { + elements[i].click(); + } + + let loadingItems = document.querySelectorAll('button.ajax-pagination-btn[type="submit"][data-disable-with][disabled]'); + while (loadingItems.length > 0) { + await new Promise((resolve) => setTimeout(resolve, 2000)); + loadingItems = document.querySelectorAll('button.ajax-pagination-btn[type="submit"][data-disable-with][disabled]'); + } + + console.log("Refreshing elements..."); + elements = document.querySelectorAll('button.ajax-pagination-btn[type="submit"][data-disable-with]'); + } + + console.log("Complete!"); + } + + async function HideResolved() + { + const elements = document.querySelectorAll("details[data-resolved='true']"); + elements.forEach(function(element) { element.setAttribute("style", "display: none !important;"); }); + } + + async function ShowResolved() + { + const elements = document.querySelectorAll("details[data-resolved='true']"); + elements.forEach(function(element) { element.removeAttribute("style"); }); + } + + async function HideCommits() + { + const elements = document.querySelectorAll("div.js-commit-group"); + elements.forEach(function(element) { element.setAttribute("style", "display: none !important;"); }); + } + + async function ShowCommits() + { + const elements = document.querySelectorAll("div.js-commit-group"); + elements.forEach(function(element) { element.removeAttribute("style"); }); + } + + async function HideStatuses() { + const elements = document.querySelectorAll(".js-timeline-item .TimelineItem[data-team-hovercards-enabled]:not([data-url]), .js-timeline-item > div > div[id|=pullrequestreview] > .TimelineItem:not([data-url]), .js-timeline-item > .TimelineItem:not([data-url]) > span.TimelineItem-badge.bg-blue.text-white"); + elements.forEach(function(element) { element.setAttribute("style", "display: none !important;"); }); + } + + async function ShowStatuses() { + const elements = document.querySelectorAll(".js-timeline-item .TimelineItem[data-team-hovercards-enabled]:not([data-url]), .js-timeline-item > div > div[id|=pullrequestreview] > .TimelineItem:not([data-url]), .js-timeline-item > .TimelineItem:not([data-url]) > span.TimelineItem-badge.bg-blue.text-white"); + elements.forEach(function(element) { element.removeAttribute("style"); }); + } + + async function HideComments() { + const elements = document.querySelectorAll(".TimelineItem.js-comment-container, .TimelineItem > .timeline-comment-group"); + elements.forEach(function(element) { element.setAttribute("style", "display: none !important;"); }); + } + + async function ShowComments() { + const elements = document.querySelectorAll(".TimelineItem.js-comment-container, .TimelineItem > .timeline-comment-group") + elements.forEach(function(element) { element.removeAttribute("style"); }); + } + + return { + Expand: Expand, + HideResolved: HideResolved, + ShowResolved: ShowResolved, + HideCommits: HideCommits, + ShowCommits: ShowCommits, + HideStatuses: HideStatuses, + ShowStatuses: ShowStatuses, + HideComments: HideComments, + ShowComments: ShowComments, + + }; +})(); \ No newline at end of file diff --git a/manifest.json b/manifest.json index c108ada..9298e94 100644 --- a/manifest.json +++ b/manifest.json @@ -1,61 +1,60 @@ { - "name": "Github Pull Request Helper", - "version": "2.0.0", - "description": "Helps to make large GitHub pull requests easier to navigate.", - "permissions": [ - "activeTab", - "tabs", - "declarativeContent", - "storage", - "webNavigation", - "http://github.com/*", - "https://github.com/*" - ], - "background": { - "scripts": [ - "js/util.js", - "js/background.js" - ], - "persistent": false + "name": "Github Pull Request Helper", + "description": "Helps to make large GitHub pull requests easier to navigate.", + "version": "2.0.0", + "manifest_version": 3, + "background": { + "service_worker": "js/service_worker.js" + }, + "content_scripts": [ + { + "matches": [ + "*://github.com/*/pull/*" + ], + "js": [ + "js/util.js", + "js/github_navigation.js" + ] + } + ], + "permissions": [ + "activeTab", + "tabs", + "declarativeContent", + "storage", + "webNavigation", + "scripting" + ], + "icons": { + "16": "images/PR_Helper_Logo_16.png", + "128": "images/PR_Helper_Logo_128.png", + "512": "images/PR_Helper_Logo_512.png", + "1600": "images/PR_Helper_Logo_1600.png", + "256": "images/PR_Helper_Logo_256.png", + "32": "images/PR_Helper_Logo_32.png", + "48": "images/PR_Helper_Logo_48.png", + "1024": "images/PR_Helper_Logo_1024.png" + }, + "options_ui": { + "page": "options.html" + }, + "content_security_policy": {}, + "options_page": "options.html", + "host_permissions": [ + "http://github.com/*", + "https://github.com/*" + ], + "action": { + "default_icon": { + "16": "images/PR_Helper_Logo_16.png", + "128": "images/PR_Helper_Logo_128.png", + "512": "images/PR_Helper_Logo_512.png", + "1600": "images/PR_Helper_Logo_1600.png", + "256": "images/PR_Helper_Logo_256.png", + "32": "images/PR_Helper_Logo_32.png", + "48": "images/PR_Helper_Logo_48.png", + "1024": "images/PR_Helper_Logo_1024.png" }, - "content_scripts": [ - { - "matches": [ - "*://github.com/*/pull/*" - ], - "js": [ - "js/util.js", - "js/github_navigation.js" - ] - } - ], - "options_page": "options.html", - "options_ui": { - "chrome_style": true, - "page": "options.html" - }, - "page_action": { - "default_popup": "popup.html", - "default_icon": { - "16": "images/PR_Helper_Logo_16.png", - "32": "images/PR_Helper_Logo_32.png", - "48": "images/PR_Helper_Logo_48.png", - "128": "images/PR_Helper_Logo_128.png", - "256": "images/PR_Helper_Logo_256.png", - "512": "images/PR_Helper_Logo_512.png", - "1024": "images/PR_Helper_Logo_1024.png", - "1600": "images/PR_Helper_Logo_1600.png" - } - }, - "icons": { - "16": "images/PR_Helper_Logo_16.png", - "32": "images/PR_Helper_Logo_32.png", - "48": "images/PR_Helper_Logo_48.png", - "128": "images/PR_Helper_Logo_128.png", - "256": "images/PR_Helper_Logo_256.png", - "512": "images/PR_Helper_Logo_512.png", - "1024": "images/PR_Helper_Logo_1024.png", - "1600": "images/PR_Helper_Logo_1600.png" - }, - "manifest_version": 2 + "default_popup": "popup.html" + } } \ No newline at end of file