Use cookie auth for legacy EEPROM endpoints.
This commit is contained in:
parent
ab95a803b4
commit
83dc860904
4 changed files with 6 additions and 8 deletions
src/ami.js
|
@ -1,11 +1,9 @@
|
||||||
#include commitment.js
|
#include commitment.js
|
||||||
#include xhr.js
|
#include xhr.js
|
||||||
|
|
||||||
var AmiEEPROM = function(endPoint, getAuthLine) {
|
var AmiEEPROM = function(endPoint) {
|
||||||
if(typeof endPoint !== 'string')
|
if(typeof endPoint !== 'string')
|
||||||
throw 'endPoint must be a string';
|
throw 'endPoint must be a string';
|
||||||
if(typeof getAuthLine !== 'function')
|
|
||||||
throw 'getAuthLine must be a function';
|
|
||||||
|
|
||||||
// when the pools rewrite happen, retrieve this from futami common
|
// when the pools rewrite happen, retrieve this from futami common
|
||||||
const appId = '1';
|
const appId = '1';
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
setInterval(refreshInfo, 600000);
|
setInterval(refreshInfo, 600000);
|
||||||
refreshInfo(function() {
|
refreshInfo(function() {
|
||||||
Chat.Main(auth);
|
Chat.Main();
|
||||||
|
|
||||||
ami.sockChat.open();
|
ami.sockChat.open();
|
||||||
window.addEventListener('beforeunload', () => ami.sockChat.close());
|
window.addEventListener('beforeunload', () => ami.sockChat.close());
|
||||||
|
|
|
@ -310,7 +310,7 @@ var Chat = (function () {
|
||||||
];
|
];
|
||||||
|
|
||||||
function Chat() {}
|
function Chat() {}
|
||||||
Chat.Main = function(auth) {
|
Chat.Main = function() {
|
||||||
bbcodes.forEach(function(item) {
|
bbcodes.forEach(function(item) {
|
||||||
UI.bbcode.push(item);
|
UI.bbcode.push(item);
|
||||||
});
|
});
|
||||||
|
@ -588,7 +588,7 @@ var Chat = (function () {
|
||||||
|
|
||||||
UI.RenderLanguage();
|
UI.RenderLanguage();
|
||||||
|
|
||||||
eepromInitialise(auth);
|
eepromInitialise();
|
||||||
};
|
};
|
||||||
Chat.InsertBBCode = function (tag, arg) {
|
Chat.InsertBBCode = function (tag, arg) {
|
||||||
if (arg === void 0) { arg = null; }
|
if (arg === void 0) { arg = null; }
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#include common.js
|
#include common.js
|
||||||
#include eeprom.js
|
#include eeprom.js
|
||||||
|
|
||||||
var eepromInitialise = function(auth) {
|
var eepromInitialise = function() {
|
||||||
window.eepromHistory = {};
|
window.eepromHistory = {};
|
||||||
window.eepromClient = new AmiEEPROM(futami.get('eeprom2'), auth.getLine);
|
window.eepromClient = new AmiEEPROM(futami.get('eeprom2'));
|
||||||
|
|
||||||
window.eepromUploadsTable = $id('uploadHistory');
|
window.eepromUploadsTable = $id('uploadHistory');
|
||||||
$id('uploadSelector').onchange = function() {
|
$id('uploadSelector').onchange = function() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue