ebooksgratis.com

See also ebooksgratis.com: no banners, no cookies, totally FREE.

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
User:GeorgeMoney/UserScripts/savecookie - Wikipedia, the free encyclopedia

User:GeorgeMoney/UserScripts/savecookie

From Wikipedia, the free encyclopedia

//

//COOKIE SAVING

function changemsg(msg,color) {
if(!color) {
var color = 'green';
}
var txtr = "editsts";
var div = document.getElementById(txtr);
div.innerHTML = '<div style="font-weight:bold; font-size:bigger;border:3px solid '+color+';background:honeydew;padding:3px;"><font color="'+color+'">'+msg+'</font></div>';

}

if (window.location.href.indexOf('action=edit') != -1 || window.location.href.indexOf('action=submit') != -1) {

addOnloadHook(function(){

s='<input id="wpSave" name="wpSave" type="submit" tabindex="5" value="Save page" accesskey="s" title="Save your changes [alt-s]" />\n<input id="wpPreview" name="wpPreview" type="submit" tabindex="6" value="Show preview" accesskey="p" title="Preview your changes, please use this before saving! [alt-p]" />\n<input id="wpDiff" name="wpDiff" type="submit" tabindex="7" value="Show changes" accesskey="v" title="Show which changes you made to the text. [alt-v]" />\n<br>';
s+='<input type="button" onclick="if(escape(document.getElementById(\'wpTextbox1\').value).length > 4038) { changemsg(\'Cannot save to cookie. Reason: Page size too large to be saved in cookie, sorry! It must be below 4038 characters in length, and your text is \'+escape(document.getElementById(\'wpTextbox1\').value).length+\' characters, which is \'+ (escape(document.getElementById(\'wpTextbox1\').value).length - 4038) + \' characters too many!\', \'red\'); alert(\'Error! Page size too large to be saved in cookie, sorry! It must be below 4038 characters in length, and your text is \'+escape(document.getElementById(\'wpTextbox1\').value).length+\' characters, which is \'+ (escape(document.getElementById(\'wpTextbox1\').value).length - 4038) + \' characters too many! \');  } else { createCookie(\'SAVEDWIKIPAGE-'+wgPageName+'\', escape(document.getElementById(\'wpTextbox1\').value), 365); changemsg(\'Cookie saved!\'); }" value="save to cookie" />  \n';
s+='<input type="button" onclick="var gh = unescape(readCookie(\'SAVEDWIKIPAGE-\'+document.getElementById(\'cookform\').value.replace(/\\s/g, \'_\'))); if(gh !== \'null\') { document.getElementById(\'wpTextbox1\').value = gh; changemsg(\'Cookie from page \'+document.getElementById(\'cookform\').value+\' successfully loaded into Edit Box\'); } else { changemsg(\'No cookie exists from page \'+document.getElementById(\'cookform\').value+\' \', \'red\'); }" value="load from cookie:" /><input type="button" onclick="eraseCookie(\'SAVEDWIKIPAGE-\'+document.getElementById(\'cookform\').value.replace(/\\s/g, \'_\')); changemsg(\'Cookie from page \'+document.getElementById(\'cookform\').value+\' deleted\');" value="delete cookie" />';
s+='<input type="text" value="'+wgPageName.replace(/\_/g, ' ')+'" id="cookform" size="40" />\n';
s+=' <input type="button" value="show all cookies" onclick="alert(document.cookie); changemsg(\'Cookies: \'+document.cookie);" /><input type="button" value="count characters" onclick="if(escape(document.getElementById(\'wpTextbox1\').value).length > 4038) { var extra = \'Which is too large to save into a cookie. Cookies can only handle 4038 characters. You have \' + (escape(document.getElementById(\'wpTextbox1\').value).length - 4038) + \' characters more than the limit. \'; } else { var extra = \'\'; } var msg = \'Characters in editbox (after converted to cookie encoded form): \'+ escape(document.getElementById(\'wpTextbox1\').value).length + \' characters. \'+extra; changemsg(msg); " />\n';
s+='<br><div id="editsts"> </div>\n';
    var divs = document.getElementsByTagName('div');
    for (i=0; i<divs.length; i++) {
           if (divs[i].className == 'editButtons') {
             divs[i].innerHTML = s;
           }
        }

});

}

//END

//


aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -