@@ 1,1 @@
+var note,cuckie_css='#cuckie_win{ position:fixed !important; margin: 0 !important; padding: 0 !important; width: 300px !important; height: 360px !important; top: 50% !important; left: 50% !important; transform: translate(-50%, -50%) !important; z-index: 99999 !important; border: solid 2px black !important; box-shadow: 10px 10px #000 !important; background: #fff !important;} #cuckie_type{ position:fixed !important; margin: 0 !important; width: 255px !important; height: 264px !important; top: 20px !important; left: 20px !important; z-index: 999999 !important; font-family: "Courier New" !important; font-size: 16px !important; line-height: 1.5 !important; outline: none !important; border: none !important; resize: none !important; box-shadow: 0 0 0 3px #fff !important; background-color: #fff; overflow: hidden !important;} #cuckie_bake{ position:fixed !important; width: 154px !important; height: 50px !important; left: -2px !important; bottom: -2px !important; z-index: 999999 !important; background: #fff !important; border: solid 2px #000 !important; outline: none !important; color: #000 !important; font-family: "arial black" !important; font-size: 20px !important; text-align: center !important;} #cuckie_eat{ position:fixed !important; width: 154px !important; height: 50px !important; bottom: -2px !important; right: -2px !important; z-index: 999999 !important; background: #fff !important; border: solid 2px #000 !important; outline: none !important; color: #000 !important; font-family: "arial black" !important; font-size: 20px !important; text-align: center !important;} #cuckie_bake:hover{ background-color: #000 !important; color: #fff !important;} #cuckie_eat:hover{ background-color: #000 !important; color: #fff !important;}',style=document.createElement("style");function setCuckie(t){var e=new Date;e.setTime(e.getTime()+2592e6),document.cookie="cuckie="+t+"; expires="+e.toGMTString()}function getCuckie(t){for(var e=t+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var o=n[i];" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(e))return o.substring(e.length,o.length)}return""}function deleteCuckie(){note=getCuckie("cuckie"),document.cookie="cuckie= ; expires = Thu, 01 Jan 1970 00:00:00 GMT"}function interfaceCuckie(){note=getCuckie("cuckie"),style.styleSheet?style.styleSheet.cssText=cuckie_css:style.appendChild(document.createTextNode(cuckie_css)),document.getElementsByTagName("head")[0].appendChild(style);var t=document.createElement("div"),e=document.createElement("button"),n=document.createElement("button"),i=document.createElement("textarea");t.setAttribute("id","cuckie_win"),i.setAttribute("id","cuckie_type"),e.setAttribute("id","cuckie_bake"),n.setAttribute("id","cuckie_eat"),i.setAttribute("autofocus",!0),i.setAttribute("spellcheck",!1),i.setAttribute("placeholder","note for this site"),i.setAttribute("rows","10"),i.setAttribute("cols","24"),i.setAttribute("wrap","hard"),i.setAttribute("data-lmit-rows","true"),t.appendChild(i),t.appendChild(e),t.appendChild(n),document.body.appendChild(t);var o=document.getElementById("cuckie_win"),r=document.getElementById("cuckie_type"),c=document.getElementById("cuckie_bake"),a=document.getElementById("cuckie_eat");c.innerHTML=""!=note?"keep":"bake",a.innerHTML="eat",i.setAttribute("onkeyup","(function(){if(document.getElementById('cuckie_bake').innerHTML=='keep'){console.log('change');document.getElementById('cuckie_bake').innerHTML='bake'}})();return false;"),c.onclick=function(){""!=(note=r.value)&&null!=note&&(setCuckie(note),o.style.display="none")},a.onclick=function(){deleteCuckie(),r.value="",o.style.display="none"},""!=note?(o.style.display="block",r.value=note):o.style.display="none",limit()}function limit(){var t=document.getElementById("cuckie_type"),e=t.getAttribute("cols");t.onkeyup=function(){for(var n=t.value.split("\n"),i=0;i<n.length;i++)if(!(n[i].length<=e)){for(var o=0,r=e;o++<=e;)" "===n[i].charAt(o)&&(r=o);n[i+1]=n[i].substring(r+1)+(n[i+1]||""),n[i]=n[i].substring(0,r)}n.length>10&&(t.style.color="red",setTimeout(function(){t.style.color=""},500)),t.value=n.slice(0,10).join("\n")}}interfaceCuckie(),chrome.runtime.onMessage.addListener(function(t,e,n){var i=document.getElementById("cuckie_win"),o=document.getElementById("cuckie_type"),r=document.getElementById("cuckie_bake");"cuckie"==t.create&&(note=getCuckie("cuckie"),o.value=note,""!==note&&(r.innerHTML="keep"),"none"==i.style.display?(i.style.display="block",o.focus()):i.style.display="none")}),document.onkeydown=function(t){27==(t=t||window.event).keyCode&&(document.getElementById("cuckie_win").style.display="none")};<
\ No newline at end of file
@@ 1,35 @@
+{
+ "manifest_version": 2,
+ "version": "0.1",
+ "name": "chrome cookie",
+ "description": "Capture pop-up notes for any website, by storing them in user-generated cookies. ",
+ "author": "Jochen Maria Weber / asWeMay",
+ "icons": {"96": "icon96.png"},
+ "browser_action": {
+ "default_icon": "icon96.png"
+ },
+ "permissions": [
+ "tabs",
+ "activeTab",
+ "http://*/*",
+ "https://*/*"
+ ],
+ "background":{
+ "scripts":[
+ "background.js"
+ ],
+ "persistent": false
+ },
+ "content_scripts": [
+ {
+ "matches": [
+ "<all_urls>"
+ ],
+ "js": ["cuckie.js"]
+ }
+ ]
+}
+
+
+
+ <
\ No newline at end of file