This only works for the new layout, so if you use classic, go here.
To use:
- To save the bookmarklet, create a new bookmark (Bookmarks > Organise Bookmarks > New bookmark) and call it whatever you want, and for the location simply copy all of the text below into the location field. Press OK, and you are done!
- Run the boomarklet on the stumbler's blog you want.
- Two new windows/tabs will appear, one is where the blog is being backed up to, the second is where you can monitor the scripts progress.
- Wait until the script has finished, it should hopefully say 'Done!'. If it has failed, either try again later, or contact StrangeJ for help. It is unadvisable to use Firefox when this script is running, due to the fact this script can and will cause major slowdown within Firefox.
- When the script is finished, open up the tab with the blog contents. This is your backup. You now have two choices of how to save the backup:
- File > Save Page As, and select 'Web Page, Complete' in the dropdown box. This will create a file and a folder, make sure they are always together. This option will save everything, including the style and all the images. This is good if you want to be able to access it when you are not connected to the internet, or just want a total backup. The problem is that with big photoblogs, this can take a lot of hard drive space. Also, when you press save, Firefox will freeze; this is normal, just wait, as it may take a few minutes.
- The second option only saves the text, all the styles and images will be taken from the internet, this means that no photos will be displayed if you arent connected to the internet when you access your saved backup, also, the style will be a default white background, as the style is also fetched from the internet. To save, View > Page Source > File > Save Page As,
javascript:(function(){function XHConn() { var xmlhttp, bComplete = false; try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp = false; }}} if (!xmlhttp) return null; this.connect = function(sURL, sMethod, sVars, fnDone) { if (!xmlhttp) return false; bComplete = false; sMethod = sMethod.toUpperCase(); try { if (sMethod == "GET") { xmlhttp.open(sMethod, sURL+"?"+sVars, true); sVars = ""; } else { xmlhttp.open(sMethod, sURL, true); xmlhttp.setRequestHeader("Method", "POST "+sURL+" HTTP/1.1"); xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); } xmlhttp.onreadystatechange = function(){ if (xmlhttp.readyState == 4 && !bComplete) { bComplete = true; fnDone(xmlhttp); }}; xmlhttp.send(sVars); } catch(z) { return false; } return true; }; return this; } var pg = window.open('about:blank','Page'); var a = document.links; for(var i=0;a[i].title.indexOf('User ID') == -1;i++){i+1} var usrid = a[i].title.split('#')[1]; var offset = 0; var tmout; var lnks = document.getElementsByTagName('link'); var style = ""; for (var i=0; i < lnks.length; i++) { if (lnks[i].rel == "stylesheet") { style += '<link type="text/css" href="'+lnks[i].href+'" rel="stylesheet">'; } } var log = window.open('about:blank','Log'); pg.document.write('<html><head>'+style+'<style></style></head><body style="font-family:\'lucida grande\',verdana,tahoma,arial,sans-serif;font-size:12px;"><div style="width:76%">'); log.document.write('<html><head><script type="text/javascript">function addRow(str1, str2) { var table = document.getElementsByTagName(\'table\')[0]; tr = document.createElement(\'tr\'); tr.appendChild(document.createElement(\'td\')).innerHTML = str1; tr.appendChild(document.createElement(\'td\')).innerHTML = str2; table.appendChild(tr); } function updateDiv(str) { document.getElementsByTagName("div")[0].innerHTML = str; }</script></head><body>'); log.document.write('<div></div>\n<br><br>\n'); log.document.write('<a id="lnk" href="javascript:void(document.getElementById(\'lnk\').style.display=\'none\');void(document.getElementById(\'tab\').style.display=\'block\');">More Details...</a>'); log.document.write('<table id="tab" border=0 style="display:none;"><tr><td><b>Page </b></td><td><b>Status</b></td></tr>'); log.document.write('</table>'); log.document.write('</body></html>'); log.document.close(); function timeOut() { XHConn.xmlhttp.abort(); log.updateDiv('<font color=red><b>Failed! - Check your internet connection: Connection Timed Out!</b></font>'); pg.document.write('</div></body></html>'); pg.document.close(); } function done(xml) { try { if (xml.status == 200) { var img = 'data:image/gif;base64,R0lGODlhEgARAIMAAFOoBmGvG3C2MIC/SIfCUp/OdKTQe7balr/eo8vktNfqxt7u0eTx2Or04vP47f7+/iH5BAAAAP8ALAAAAAASABEAAART8MlJ61PK6ueKWFvFDEITUopQnlMSCAwruUEmKwGQyE+TGzyHADDQOAyBgUNCAARMlkUOAEQAAIiQ1OkCEFiG6zR28l0BBV7YCWUtAAIbD7FkRQAAOw=='; } else { var img = 'data:image/gif;base64,R0lGODlhEgASAIABAAAAAP///yH5BAEKAAEALAAAAAASABIAAAIljI+py+3/AEiSyXkuptfozU1f81WRBgXluVroGJpqF3NuiudKAQA7'; } img = '<img src="' + img + '" width=19 height=18>'; log.addRow(offset,xml.status + ' ' + img); log.updateDiv('Processing Page: ' + offset/10); if (xml.status == 0) throw('Error Code: 0'); if (xml.status != 200) { clearTimeout(tmout); log.updateDiv('<font color=red><b>Failed! - Error: ' + xml.status + ', ' + xml.statusText + '</b></font>'); pg.document.write('</div></body></html>'); pg.document.close(); } else { pg.document.write(xml.responseText); if (xml.responseText.length < 5) { clearTimeout(tmout); pg.document.write('</div></body></html>'); pg.document.close(); log.updateDiv('<font color=green size=5><b>Done!</b></font>'); } else { offset = offset +10; clearTimeout(tmout); tmout = setTimeout("timeOut()",30000); if(conn.connect('http://'+document.domain+'/display_urls.php','GET','id=' + usrid + '&offset=' + offset, done) == false) { throw('Connection Returned False'); } } } } catch (e) { var undefined; clearTimeout(tmout); log.updateDiv('<font color=red><b>Failed! - Check your internet connection</b></font> <font size=0 color=lightgrey>' + e.name + ': ' + (e.message.length < 100 ? e.message : "") + '</font>'); pg.document.write('</div></body></html>'); pg.document.close(); } } var conn = new XHConn(); conn.connect('http://'+document.domain+'/display_urls.php','GET','id=' + usrid + '&offset=0', done);})();