-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontrols.min.js
More file actions
18 lines (18 loc) · 3.4 KB
/
controls.min.js
File metadata and controls
18 lines (18 loc) · 3.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/**
* rgshw.github.io: The selector site for the projection tools used in the main hall.
* <https://github.com/rgshw/rgshw.github.io/>
* Copyright (C) 2018 Matt Cowley (MattIPv4) (me@mattcowley.co.uk)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, please see
* <https://github.com/rgshw/rgshw.github.io/blob/master/LICENSE> or <http://www.gnu.org/licenses/>.
**/
function showHelp(e){var t=document.createElement("div");t.style.position="fixed",t.style.width="95%",t.style.maxWidth="95%",t.style.height="90%",t.style.maxHeight="90%",t.style.top="5%",t.style.left="2.5%",t.style.padding="15px 30px",t.style.boxSizing="border-box",t.style.zIndex="99999",t.style.boxShadow="0 0 60px 30px rgba(0,0,0,0.6)",t.style.fontSize="18px",t.style.color="#000",t.style.fontFamily="sans-serif",t.style.background="rgba(255,255,255,0.97)",t.style.overflowY="scroll";var o=document.createElement("h1");o.textContent="Need help?",t.appendChild(o);var n=document.createElement("p");n.innerHTML="This website/tool is a project created by <a href='https://mattcowley.co.uk'>Matt Cowley</a> intended for use by the <a href='https://rgshw.com'>Royal Grammar School, High Wycombe</a>.",t.appendChild(n);var l=document.createElement("p");l.innerHTML="You can get support for this website if you are having an issue by emailing me directly: <a href='mailto:me@mattcowley.co.uk'>me@mattcowley.co.uk</a>.",t.appendChild(l);var s=document.createElement("p");e="github.com/rgshw/"+e;s.innerHTML="This website is also open source and available on GitHub, you are welcome to make changes and submit pull requests on the repository: <a href='https://"+e+"'>"+e+"</a>.",t.appendChild(s);var i=document.createElement("a");i.href="javascript:null;",i.textContent="Close.",i.onclick=function(){t.parentElement.removeChild(t)},t.appendChild(i),document.body.appendChild(t)}function help(e){var t=document.createElement("a");t.style.position="fixed",t.style.top="5%",t.style.right="2.5%",t.style.zIndex="99998",t.textContent="?",t.style.fontWeight="900",t.style.fontSize="24px",t.style.cursor="pointer",t.style.textDecoration="none",t.style.color="#000",t.style.fontFamily="monospace",t.onmouseenter=function(){t.style.color="#f45"},t.onmouseleave=function(){t.style.color="#000"},t.onclick=function(){showHelp(e)},document.body.appendChild(t)}function home(){var e=document.createElement("a");e.style.position="fixed",e.style.top="5%",e.style.left="2.5%",e.style.zIndex="99998",e.innerHTML="➜",e.style.fontWeight="900",e.style.fontSize="24px",e.style.cursor="pointer",e.style.textDecoration="none",e.style.color="#000",e.style.fontFamily="monospace",e.style.transform="rotate(180deg)",e.onmouseenter=function(){e.style.color="#f45"},e.onmouseleave=function(){e.style.color="#000"},e.onclick=function(){window.location="https://rgshw.github.io/"},document.body.appendChild(e)}function controls(e,t){t&&home(),help(e)}