Relative links in blog post previews is a bad idea

This commit is contained in:
Jeff Parsons 2016-02-17 17:52:26 -08:00
commit e40028d431
2 changed files with 4 additions and 4 deletions

View file

@ -6,9 +6,9 @@ permalink: /blog/2016/02/17/
---
PCjs (v1.20.9) now offers some new, *much* easier ways to save disks and machines, thanks to the new
[Save Disk](#saving-disks) and [Save Machine](#saving-machines) features. With one click, PCjs can now
generate a single download containing everything you need to embed any of our IBM PC demos on your own
web page.
[Save Disk](/blog/2016/02/17/#saving-disks) and [Save Machine](/blog/2016/02/17/#saving-machines) features.
With one click, PCjs can now generate a single download containing everything you need to embed any of our
IBM PC demos on your own web page.
Saving Disks
---

View file

@ -1025,7 +1025,7 @@ Td.prototype={constructor:Td,value:function(){return this[this.id]},data:functio
this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c,1);c=0}}};function Qm(a,b){a[a.id]={};b&&D(a,"parms",b);a.A=!1}function Rm(a){var b=!0;if(ta()){var c=JSON.stringify(a[a.id]);va(a.key,c)||(g("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}function Sm(a){var b=!0;try{a[a.id]=JSON.parse(a[a.id])}catch(c){g(c.message||c),b=!1}return b}function Tm(a,b){return a[a.id][b]||null}function D(a,b,c){try{a[a.id][b]=c}catch(d){}}
function Um(a,b,c){Ha.call(this,"Computer",a,Um);this.ja.Qb=!1;Vm(this,b);this.S=Zl(this,"autoPower",a);this.F=0;this.ta=a.busWidth||a.buswidth;this.B=Wm;this.T=null;this.J=this.ha=!1;this.ka=Zl(this,"url")||"";this.na=(Math.random()+.1).toString(36).substr(2,12);this.D=Xm(this);if(this.A=Ua("CPU",this.id)){this.Ta=Ua("Debugger",this.id);this.oa=new qb({id:this.mf+".bus",buswidth:this.ta},this.A,this.Ta);var d,e=Sa(this.id);if((this.md=Ua("Panel",this.id))&&this.md.hg)for(b=0;b<e.length;b++)d=e[b],
d.Ha=this.md.Ha,d.pc=this.md.pc,d.hg=this.md.hg;for(b=0;b<e.length;b++)d=e[b],d.nc&&d.nc(this,this.oa,this.A,this.Ta);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.N=d:this.B=parseInt(d,10));var k;if(a=Ka&&Ka.state||Zl(this,"state")||(k=!0,a.state))b=this.W=a,k||(this.J=!0,this.B=Wm),this.B&&(this.O=new Td(this,Ym),this.O.load()?b=null:delete this.O);!b&&this.B&&(k=null,this.D&&(k=qa()+"/api/v1/user?req=load&user="+this.D+"&state="+Pm(this,Ym)),b=k)&&(this.J=!0);b?pa(b,!0,null,this,this.qj):$a(this);
this.pa.power||(this.S=!0);!c&&this.S&&Zm(this,this.bf)}else g("Unable to find CPU component")}Pa(Um);var Ym="1.20.9",Wm=0;f=Um.prototype;f.qe=function(){return this.na};function Vm(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){g(d.message+" ("+c+")")}}a.K=b}function Zl(a,b,c){var d=null;a.K&&(d=a.K[b]);null==d&&c&&(d=c[b]);null==d&&"object"==typeof resources&&resources[b]&&(d=b);return d}f.xd=function(){return this.D||""};
this.pa.power||(this.S=!0);!c&&this.S&&Zm(this,this.bf)}else g("Unable to find CPU component")}Pa(Um);var Ym="1.20.9",Wm=0;f=Um.prototype;f.qe=function(){return this.na};function Vm(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){g(d.message+" ("+c+")")}}a.K=b}function Zl(a,b,c){var d;a.K&&(d=a.K[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}f.xd=function(){return this.D||""};
f.qj=function(a,b,c){c?(this.N=null,this.J=!1,this.Ha("Unable to load machine state from server (error "+c+(b?": "+(String.prototype.trim?b.trim():b.replace(/^\s+|\s+$/g,"")):"")+")")):(this.T=b,this.ha=!0);$a(this)};function Zm(a,b,c){for(var d=Sa(a.id),e=0;e<=d.length;e++){var k=e<d.length?d[e]:a;if(!ab(k)){ab(k,function(){Zm(a,b,c)});return}}b.call(a,c)}
function $m(a,b){var c=new Td(a,Ym,"validate");if(c.load()&&Sm(c)){var d=Tm(c,"timestamp"),e=b?Tm(b,"timestamp"):"unknown";d!=e&&(a.Ha("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}
f.bf=function(a){void 0===a&&(a=this.B||(this.T?1:Wm));if(!this.F){this.F++;var b=!1,c=!1;this.da=!1;var d=this.O||new Td(this,Ym);if(-1==a)b=!0;else if(a>Wm){if(d.load(this.T)){this.H=new Td(this,Ym,"failsafe");this.H.load()&&(an(this,d),a=2,Qm(this.H));D(this.H,"timestamp",la());Rm(this.H);var e=this.B&&!this.J;if(1==a||ra("Click OK to restore the previous PCjs machine state, or CANCEL to reset the machine.")){if(c=Sm(d)){var k=Tm(d,"code"),l=Tm(d,"data");k&&("ok"==k?d.load(l):("error"==k&&"no machine state"!=