v 1.0
This commit is contained in:
parent
d900dc247a
commit
b7eeb63eb1
BIN
Go2ticket.zip
Normal file
BIN
Go2ticket.zip
Normal file
Binary file not shown.
13
go2ticket-firefox/background.js
Normal file
13
go2ticket-firefox/background.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
|
||||
browserAction.onClicked.addListener(function(tab) {
|
||||
if (localStorage.getItem("url") == null) {
|
||||
var url = false;
|
||||
}else{
|
||||
var url = localStorage.getItem("url");
|
||||
}
|
||||
tabs.executeScript({
|
||||
code: ''
|
||||
});
|
||||
|
||||
|
||||
});
|
BIN
go2ticket-firefox/icons/go2ticket.png
Normal file
BIN
go2ticket-firefox/icons/go2ticket.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 204 KiB |
42
go2ticket-firefox/manifest.json
Normal file
42
go2ticket-firefox/manifest.json
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"manifest_version": 2,
|
||||
"name": "Go2Ticket Firefox",
|
||||
"version": "1.0",
|
||||
"author": "Clément CHABANNE",
|
||||
|
||||
"description": "Allez directement à un numéro de ticket GLPI depuis son numéro.",
|
||||
"homepage_url": "https://git.chabanne.ch/clement/Go2ticket",
|
||||
"icons": {
|
||||
"48": "icons/go2ticket.png"
|
||||
},
|
||||
|
||||
"permissions": ["storage", "tabs"],
|
||||
"background": {
|
||||
"scripts": ["background.js"]
|
||||
},
|
||||
"browser_action": {
|
||||
"default_icon": "icons/go2ticket.png",
|
||||
"default_title": "Go2Ticket",
|
||||
"default_popup": "popup/go2ticket.html"
|
||||
},
|
||||
"options_ui": {
|
||||
"page": "options/options.html",
|
||||
"browser_style": false
|
||||
},
|
||||
"commands": {
|
||||
"_execute_browser_action": {
|
||||
"suggested_key": {
|
||||
"default": "Ctrl+Shift+U",
|
||||
"linux": "Ctrl+Shift+L"
|
||||
},
|
||||
"description": "Send a 'toggle-feature' event"
|
||||
},
|
||||
"_execute_sidebar_action": {
|
||||
"suggested_key": {
|
||||
"default": "Alt+Shift+U",
|
||||
"linux": "Alt+Shift+L"
|
||||
},
|
||||
"description": "Send a 'toggle-feature' event"
|
||||
}
|
||||
}
|
||||
}
|
14
go2ticket-firefox/options/options.html
Normal file
14
go2ticket-firefox/options/options.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="options.css"/>
|
||||
</head>
|
||||
<body>
|
||||
</br></br>
|
||||
<label for="url">URL des ticket de votre GLPI : </label>
|
||||
<input type="text" id="url">
|
||||
<button id="save">Sauvegarder</button>
|
||||
<script src="options.js"></script>
|
||||
</body>
|
||||
</html>
|
12
go2ticket-firefox/options/options.js
Normal file
12
go2ticket-firefox/options/options.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
function save_options() {
|
||||
var url = document.getElementById('url').value;
|
||||
localStorage.setItem("url", url);
|
||||
alert(url);
|
||||
}
|
||||
function url()
|
||||
{
|
||||
document.getElementById("url").value=localStorage.getItem("url");
|
||||
}
|
||||
|
||||
document.getElementById('save').addEventListener('click', save_options);
|
||||
url();
|
4
go2ticket-firefox/popup/go2ticket.css
Normal file
4
go2ticket-firefox/popup/go2ticket.css
Normal file
|
@ -0,0 +1,4 @@
|
|||
html, body {
|
||||
width: 300px;
|
||||
background-color: black;
|
||||
}
|
14
go2ticket-firefox/popup/go2ticket.html
Normal file
14
go2ticket-firefox/popup/go2ticket.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="go2ticket.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<form action="" target="_blank" id="form">
|
||||
<input type="text" name="id" autofocus>
|
||||
<input type="submit" id="valid" value="OK">
|
||||
</form>
|
||||
<script src="go2ticket.js"></script>
|
||||
</body>
|
||||
</html>
|
2
go2ticket-firefox/popup/go2ticket.js
Normal file
2
go2ticket-firefox/popup/go2ticket.js
Normal file
|
@ -0,0 +1,2 @@
|
|||
document.getElementById("form").action=localStorage.getItem("url");
|
||||
//browserAction.closePopup();
|
Loading…
Reference in New Issue
Block a user