diff options
Diffstat (limited to '2016_mirror_browser/chrome')
| -rw-r--r-- | 2016_mirror_browser/chrome/icon-16.png | bin | 0 -> 619 bytes | |||
| -rw-r--r-- | 2016_mirror_browser/chrome/icon-32.png | bin | 0 -> 1202 bytes | |||
| -rw-r--r-- | 2016_mirror_browser/chrome/icon-64.png | bin | 0 -> 2663 bytes | |||
| -rw-r--r-- | 2016_mirror_browser/chrome/icon.png | bin | 0 -> 1701 bytes | |||
| -rw-r--r-- | 2016_mirror_browser/chrome/manifest.json | 23 | ||||
| -rw-r--r-- | 2016_mirror_browser/chrome/mirror.css | 3 | ||||
| -rw-r--r-- | 2016_mirror_browser/chrome/mirror.js | 39 | ||||
| -rw-r--r-- | 2016_mirror_browser/chrome/popup.html | 58 | 
8 files changed, 123 insertions, 0 deletions
| diff --git a/2016_mirror_browser/chrome/icon-16.png b/2016_mirror_browser/chrome/icon-16.pngBinary files differ new file mode 100644 index 0000000..79df038 --- /dev/null +++ b/2016_mirror_browser/chrome/icon-16.png diff --git a/2016_mirror_browser/chrome/icon-32.png b/2016_mirror_browser/chrome/icon-32.pngBinary files differ new file mode 100644 index 0000000..4e7aa3a --- /dev/null +++ b/2016_mirror_browser/chrome/icon-32.png diff --git a/2016_mirror_browser/chrome/icon-64.png b/2016_mirror_browser/chrome/icon-64.pngBinary files differ new file mode 100644 index 0000000..32577f2 --- /dev/null +++ b/2016_mirror_browser/chrome/icon-64.png diff --git a/2016_mirror_browser/chrome/icon.png b/2016_mirror_browser/chrome/icon.pngBinary files differ new file mode 100644 index 0000000..413653a --- /dev/null +++ b/2016_mirror_browser/chrome/icon.png diff --git a/2016_mirror_browser/chrome/manifest.json b/2016_mirror_browser/chrome/manifest.json new file mode 100644 index 0000000..b296a4e --- /dev/null +++ b/2016_mirror_browser/chrome/manifest.json @@ -0,0 +1,23 @@ +{ +	"manifest_version": 2, + +	"name": "Mirror", +	"description": "This mirror flips your online activity!", +	"version": "1.0", +	 "author": "joak", +	"permissions": ["activeTab"], +	"browser_action": { +		"default_icon": "icon.png", +		"default_popup": "popup.html", +		"default_title": "Flip horizontally page!" +	}, +	"icons": {  +		"16": "icon-16.png", +		"32": "icon-32.png", +		"64": "icon-64.png" +	}, +	"content_scripts": [{ +		"matches": ["<all_urls>"], +		"css": ["mirror.css"] +    }] +} diff --git a/2016_mirror_browser/chrome/mirror.css b/2016_mirror_browser/chrome/mirror.css new file mode 100644 index 0000000..78c8a81 --- /dev/null +++ b/2016_mirror_browser/chrome/mirror.css @@ -0,0 +1,3 @@ +/* +empty +*/ diff --git a/2016_mirror_browser/chrome/mirror.js b/2016_mirror_browser/chrome/mirror.js new file mode 100644 index 0000000..558c357 --- /dev/null +++ b/2016_mirror_browser/chrome/mirror.js @@ -0,0 +1,39 @@ +document.addEventListener('DOMContentLoaded', init); + +function init(){ +    var elem1 = document.getElementById('lron'); +    elem1.addEventListener('click',funclron); +    var elem2 = document.getElementById('lroff'); +    elem2.addEventListener('click',funclroff);  +    var elem3 = document.getElementById('upon'); +    elem3.addEventListener('click',funcudon); +    var elem4 = document.getElementById('upoff'); +    elem4.addEventListener('click',funcudoff); +} + +function funclron(){ +	chrome.tabs.insertCSS({ +		code: "body{transform: rotateY(180deg);}" +	}); +} + +function funclroff(){ +	chrome.tabs.insertCSS({ +		code: "body{transform: rotateY(0deg);}" +	}); +} + + +function funcudon(){ +	chrome.tabs.insertCSS({ +		code: "body{transform: rotateX(180deg);}" +	}); +} + +function funcudoff(){ +	chrome.tabs.insertCSS({ +		code: "body{transform: rotateX(0deg);}" +	}); +} + + diff --git a/2016_mirror_browser/chrome/popup.html b/2016_mirror_browser/chrome/popup.html new file mode 100644 index 0000000..17e2c9c --- /dev/null +++ b/2016_mirror_browser/chrome/popup.html @@ -0,0 +1,58 @@ +<!doctype html> +<html> +  <head> +    <title>Mirror</title> +    <style> +	body { +		font-family: "Segoe UI", "Lucida Grande", Tahoma, sans-serif; +        font-size: 100%; +        background: white; +        width: 400px; +        height: 105px; +	} +	#button { +		text-align: center; +		margin-top: 15px; +		margin-bottom: 5px; +	} +	#start { +		position: absolute: +		top: 50%; +	} +	#wrapper{ +		border: 5px solid black; +		padding: 10px; +	} +	#title{ +		text-align: center; +	} +	#title h2{ +		margin-top: 1px; +	} +	#settings{ +		text-align: center; +	} +    </style> +    <script src="mirror.js"></script> +  </head> +  <body> +	<div id="wrapper"> +		<div id="title"> +			<h2>Mirror</h2> +		</div> +		<div id="settings"> +			<div id="button"> +				<p>⬌ +					<button type="button" id="lron">On</button> +					<button type="button" id="lroff">Off</button> +				</p> +				<p>⬍ +					<button type="button" id="upon">O    n</button> +					<button type="button" id="upoff">    Off</button> +				</p> +			</div> +		</div> +	</div> +  </body> +</html> + | 
