Dom binding timing
Order of operations nonsense now that I'm ajaxing the markup
This commit is contained in:
parent
d79bfc24ac
commit
a78e235e5f
1 changed files with 3 additions and 4 deletions
|
|
@ -1,5 +1,4 @@
|
||||||
var pdApp;
|
var pdApp = {
|
||||||
pdApp = {
|
|
||||||
init: function () {
|
init: function () {
|
||||||
document.title = $('#header-bottom-right .user a').first().text()+' | Power Delete Suite';
|
document.title = $('#header-bottom-right .user a').first().text()+' | Power Delete Suite';
|
||||||
console.log('init');
|
console.log('init');
|
||||||
|
|
@ -12,7 +11,6 @@ pdApp = {
|
||||||
user : $('#header-bottom-right .user a').first().text()
|
user : $('#header-bottom-right .user a').first().text()
|
||||||
};
|
};
|
||||||
pdApp.prepDom();
|
pdApp.prepDom();
|
||||||
pdApp.bindUI();
|
|
||||||
pdApp.parseSettings();
|
pdApp.parseSettings();
|
||||||
} else {
|
} else {
|
||||||
if (confirm('This script is designed to be run from your own user profile. Would you like to navigate there?')) {
|
if (confirm('This script is designed to be run from your own user profile. Would you like to navigate there?')) {
|
||||||
|
|
@ -49,8 +47,9 @@ pdApp = {
|
||||||
url: 'https://www.reddit.com/r/PowerDeleteSuite/wiki/centralform.json',
|
url: 'https://www.reddit.com/r/PowerDeleteSuite/wiki/centralform.json',
|
||||||
context: $('#pd__central')
|
context: $('#pd__central')
|
||||||
}).then(function(data) {
|
}).then(function(data) {
|
||||||
$(this).html($("<textarea/>").html(data.data.content_md).text());
|
$(this).html($("<textarea/>").html(data.data.content_md).text());
|
||||||
pdApp.prepSubs();
|
pdApp.prepSubs();
|
||||||
|
pdApp.bindUI();
|
||||||
}, function() {
|
}, function() {
|
||||||
alert('Error retreiving markup from /r/PowerDeleteSuite');
|
alert('Error retreiving markup from /r/PowerDeleteSuite');
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue