Ze först kommit.
This commit is contained in:
Generated
+2
@@ -0,0 +1,2 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/workspace.xml
|
||||||
Generated
+8
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="WEB_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
Generated
+6
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="JavaScriptSettings">
|
||||||
|
<option name="languageLevel" value="ES6" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
Generated
+8
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/cyclefraudster.iml" filepath="$PROJECT_DIR$/.idea/cyclefraudster.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
chrome.runtime.onInstalled.addListener(function() {
|
||||||
|
chrome.storage.sync.set({color: '#3aa757'}, function() {
|
||||||
|
console.log("The color is green.");
|
||||||
|
});
|
||||||
|
|
||||||
|
chrome.declarativeContent.onPageChanged.removeRules(undefined, function() {
|
||||||
|
chrome.declarativeContent.onPageChanged.addRules([{
|
||||||
|
conditions: [new chrome.declarativeContent.PageStateMatcher({
|
||||||
|
pageUrl: {hostEquals: 'developer.chrome.com'},
|
||||||
|
})
|
||||||
|
],
|
||||||
|
actions: [new chrome.declarativeContent.ShowPageAction()]
|
||||||
|
}]);
|
||||||
|
});
|
||||||
|
|
||||||
|
let i = 0;
|
||||||
|
setInterval(() => {
|
||||||
|
console.log(`${++i}s since start`)
|
||||||
|
}, 1000);
|
||||||
|
});
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
alert("Surprise motherfuckers");
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"name": "YKonsole Helper",
|
||||||
|
"version": "1.0",
|
||||||
|
"manifest_version": 2,
|
||||||
|
"description": "Extension to control YKonsole",
|
||||||
|
"background": {
|
||||||
|
"scripts": ["background.js"],
|
||||||
|
"persistent": false
|
||||||
|
},
|
||||||
|
"page_action": {
|
||||||
|
"default_icon": "icon.png",
|
||||||
|
"default_popup": "popup.html"
|
||||||
|
},
|
||||||
|
"icons": {
|
||||||
|
"32": "icon.png"
|
||||||
|
},
|
||||||
|
"permissions": [
|
||||||
|
"storage",
|
||||||
|
"activeTab",
|
||||||
|
"declarativeContent",
|
||||||
|
"https://indigo.stian-aune.com/"
|
||||||
|
]
|
||||||
|
}
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="NO">
|
||||||
|
<head>
|
||||||
|
<style>
|
||||||
|
button {
|
||||||
|
height: 30px;
|
||||||
|
width: 30px;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<button id="changeColor" value="#FF0000">qqq</button>
|
||||||
|
<script src="popup.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
let changeColor = document.getElementById('changeColor');
|
||||||
|
chrome.storage.sync.get('color', function(data) {
|
||||||
|
changeColor.style.backgroundColor = data.color;
|
||||||
|
changeColor.setAttribute('value', data.color);
|
||||||
|
});
|
||||||
|
|
||||||
|
let mOverlay = document.createElement("div");
|
||||||
|
mOverlay.innerHTML = "<b>QUQ</b>";
|
||||||
|
|
||||||
|
changeColor.onclick = function(element) {
|
||||||
|
// TODO: Add settings to STORAGE
|
||||||
|
|
||||||
|
let color = element.target.value;
|
||||||
|
chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
|
||||||
|
chrome.tabs.executeScript(
|
||||||
|
tabs[0].id,
|
||||||
|
{file: 'contentScript.js'});
|
||||||
|
});
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user