diff options
author | id_ed25519_bbb.git <joak@nospace.at> | 2016-12-19 20:04:05 +0100 |
---|---|---|
committer | id_ed25519_bbb.git <joak@nospace.at> | 2016-12-19 20:04:05 +0100 |
commit | 26b134161719ca19c5174c9f6524a13280684155 (patch) | |
tree | 98883302b9e5229cb76a673e18ab8d0385679fd2 /2016_mirror_browser/firefox/mirror.js | |
parent | 3c08a384d5471bca3e414091aeef9afcfb9ba668 (diff) |
update
Diffstat (limited to '2016_mirror_browser/firefox/mirror.js')
-rw-r--r-- | 2016_mirror_browser/firefox/mirror.js | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/2016_mirror_browser/firefox/mirror.js b/2016_mirror_browser/firefox/mirror.js new file mode 100644 index 0000000..699ac39 --- /dev/null +++ b/2016_mirror_browser/firefox/mirror.js @@ -0,0 +1,41 @@ + +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(){ + browser.tabs.executeScript({ + code: "document.body.style.transform = 'rotateY(180deg)';" + }); +} + +function funclroff(){ + browser.tabs.executeScript({ + code: "document.body.style.transform = 'rotateY(0deg)';" + }); +} + + +function funcudon(){ + browser.tabs.executeScript({ + code: "document.body.style.transform = 'rotateX(180deg)';" + }); +} + +function funcudoff(){ + browser.tabs.executeScript({ + code: "document.body.style.transform = 'rotateX(0deg)';" + }); +} + + +document.addEventListener('DOMContentLoaded', init); + + |