-
Notifications
You must be signed in to change notification settings - Fork 0
/
details.html
45 lines (42 loc) · 1.32 KB
/
details.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<html>
<head>
<meta charset="utf-8">
<meta name="viewport">
<link href="css/util.css" rel="stylesheet" type="text/css">
<link href="css/fonts.css" rel="stylesheet" type="text/css">
<link href="style/confirm.css" rel="stylesheet" type="text/css">
<script>
function gup(name) {
name = RegExp ('[?&]' + name.replace (/([[\]])/, '\\$1') + '=([^&#]*)');
return (window.location.href.match (name) || ['', ''])[1];
}
function remover() {
var keywords = JSON.parse(localStorage["keywords"]);
keywords.splice(gup("i"), 1);
localStorage["keywords"] = JSON.stringify(keywords);
var palavra = gup("palavra")
console.log("Removido palavra '"+palavra+"' dos interesses (indice "+gup("i")+")");
window.location = "keywords.html?removido="+palavra;
return false;
}
</script>
</head>
<body>
<form role="dialog" data-type="confirm">
<section>
<h1>Confirmação</h1>
<p>
<strong></strong>
</p>
<p>Você quer remover esse interesse?</p>
</section>
<menu>
<button onclick="javascript:window.location = 'keywords.html'; return false;">Cancelar</button>
<button class="recommend" onclick="javascript:return remover()">Sim</button>
</menu>
</form>
<script>
document.querySelector("form strong").innerHTML = gup("palavra");
</script>
</body>
</html>