mirror of
https://github.com/goonstation/goonstation-2020.git
synced 2026-08-25 13:06:15 +01:00
40 lines
818 B
JavaScript
40 lines
818 B
JavaScript
window.sizeHelper = {
|
|
loaded: false,
|
|
holderRef: '',
|
|
interface: '',
|
|
dataProp: '',
|
|
|
|
loadMetas: function() {
|
|
var metas = document.getElementsByTagName('meta');
|
|
|
|
for (var i = 0; i < metas.length; i++) {
|
|
if (metas[i].getAttribute('name') === 'holderRef') {
|
|
this.holderRef = metas[i].getAttribute('content');
|
|
}
|
|
|
|
if (metas[i].getAttribute('name') === 'interface') {
|
|
this.interface = metas[i].getAttribute('content');
|
|
}
|
|
|
|
if (metas[i].getAttribute('name') === 'dataProp') {
|
|
this.dataProp = metas[i].getAttribute('content');
|
|
}
|
|
}
|
|
},
|
|
|
|
update: null,
|
|
|
|
init: function() {
|
|
this.loadMetas();
|
|
|
|
if (typeof this.update === 'function') {
|
|
this.update();
|
|
}
|
|
|
|
if (this.holderRef) {
|
|
window.location = '?src=' + this.holderRef + ';action=loaded';
|
|
this.loaded = true;
|
|
}
|
|
}
|
|
};
|