forked from iusondemand/open-notice-consent-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtracker.htm
38 lines (38 loc) · 1.42 KB
/
tracker.htm
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
<a href='javascript:(
function() {
var INSTAPAPER=true,w=window,d=document;
var pageSelectedTxt=w.getSelection?w.getSelection():(d.getSelection)?d.getSelection().htmlText:(d.selection?d.selection.createRange().htmlText:0);
var html = "";
if (typeof window.getSelection != "undefined") {
var sel = window.getSelection();
if (sel.rangeCount) {
var container = document.createElement("div");
for (var i = 0, len = sel.rangeCount; i < len; ++i) {
container.appendChild(sel.getRangeAt(i).cloneContents());
}
html = container.innerHTML;
}
} else if (typeof document.selection != "undefined") {
if (document.selection.type == "Text") {
html = document.selection.createRange().htmlText;
}
}
var pageSelectedTxt=html;
var pageTitle=d.title,pageUri=w.location.href,tmplt="";
var to="http://www.ricercagiuridica.com/sentenze/invialet.php";
var p={Massima:"fonte:\r\n"+pageUri, Estremi:""+pageTitle, Testo:""+pageSelectedTxt};
var myForm = document.createElement("form");
myForm.method="post";
myForm.enctype="multipart/form-data";
myForm.action=to;
for (var k in p) {
var myInput=document.createElement("input") ;
myInput.setAttribute("name",k);
myInput.setAttribute("value",p[k]);
myForm.appendChild(myInput);
}
document.body.appendChild(myForm);
myForm.submit();
document.body.removeChild(myForm);
})
();'>Save your Consent</a>