* Add #purchase to Credit * Assigns spent credits to the listing * Add Credits::Ledger and use it * Localize ledger datetimes * Add organization to the ledger * Add tests for ledger * Remove unused class * Fix scope error * Compare UTC times * Fix broken specs * Wrap listing create in a transaction * Wrap listings bump into a transaction * Avoid microseconds issue with datetimes in tests * Use .detect instead of .select.first * Fix spec description
61 lines
1.6 KiB
Text
61 lines
1.6 KiB
Text
function initializePage(){
|
|
initializeLocalStorageRender();
|
|
initializeStylesheetAppend();
|
|
initializeFetchFollowedArticles();
|
|
callInitalizers();
|
|
}
|
|
|
|
function callInitalizers(){
|
|
initializeLocalStorageRender();
|
|
initializeBodyData();
|
|
var waitingForDataLoad = setInterval(function(){
|
|
if (document.getElementsByTagName('body')[0].getAttribute('data-loaded') == "true") {
|
|
clearInterval(waitingForDataLoad);
|
|
if (document.getElementsByTagName('body')[0].getAttribute('data-user-status') == "logged-in") {
|
|
initializeAllChatButtons();
|
|
initializeBaseUserData();
|
|
}
|
|
initializeAllFollowButts();
|
|
initializeReadingListIcons();
|
|
initializeSponsorshipVisibility();
|
|
if ( document.getElementById("sidebar-additional") ) {
|
|
document.getElementById("sidebar-additional").classList.add("showing");
|
|
}
|
|
}
|
|
},1)
|
|
initializeBaseTracking();
|
|
initializeTouchDevice();
|
|
initializeCommentsPage();
|
|
initializeArticleDate();
|
|
initializeArticleReactions();
|
|
initNotifications();
|
|
initializeStylesheetAppend();
|
|
initializeCommentDate();
|
|
initializeCommentDropdown();
|
|
initializeSettings();
|
|
initializeFooterMod();
|
|
initializeCommentPreview();
|
|
initializeAdditionalContentBoxes();
|
|
initializeTimeFixer();
|
|
initializeDashboardSort();
|
|
initializePWAFunctionality();
|
|
initializeEllipsisMenu();
|
|
initializeArchivedPostFilter();
|
|
initializeCreditsPage();
|
|
|
|
initializeDrawerSliders();
|
|
|
|
function freezeScrolling(event){
|
|
event.preventDefault();
|
|
}
|
|
|
|
nextPage = 0;
|
|
fetching = false;
|
|
done = false;
|
|
setTimeout(function(){
|
|
done = false;
|
|
},300);
|
|
if(!initScrolling.called) {
|
|
initScrolling();
|
|
}
|
|
}
|