Adjusting to changed reddit code. -_-
This commit is contained in:
j0be 2017-02-17 17:43:59 -05:00 committed by GitHub
parent bda00ead30
commit c0ed6c177c

View file

@ -1,5 +1,5 @@
var pd = { var pd = {
version: '1.4.2', version: '1.4.3',
bookmarkver: '1.1', bookmarkver: '1.1',
init : function() { init : function() {
pd.checks.versions(); pd.checks.versions();
@ -66,7 +66,7 @@ var pd = {
applyDom: function () { applyDom: function () {
if (pd.debugging) {$('#pd__central,#pd__style').remove('');} if (pd.debugging) {$('#pd__central,#pd__style').remove('');}
document.title = pd.config.user +' | Power Delete Suite'; document.title = pd.config.user +' | Power Delete Suite';
window.onerror = pd.error; $(window).on("error", pd.error);
$('.sitetable,.neverEndingReddit').remove(); $('.sitetable,.neverEndingReddit').remove();
if ($('#pd__central').length === 0) { if ($('#pd__central').length === 0) {
@ -123,7 +123,7 @@ var pd = {
$('#pd__sub-list').append('<div><input class=\'ind\' data-sub=\''+sub_arr[i]+'\' type=\'checkbox\' name=\''+sid+'\' id=\''+sid+'\'\'/><label class=\''+sid+'\' for=\''+sid+'\'>'+sub_arr[i]+'</label></div>'); $('#pd__sub-list').append('<div><input class=\'ind\' data-sub=\''+sub_arr[i]+'\' type=\'checkbox\' name=\''+sid+'\' id=\''+sid+'\'\'/><label class=\''+sid+'\' for=\''+sid+'\'>'+sub_arr[i]+'</label></div>');
} }
$('#side-mod-list li').each(function() { $('#side-mod-list li').each(function() {
$('.sub--'+$(this).text().replace('/r/','')).prepend('<b class=\'m\'>[M]</b>'); $('.sub--'+$(this).text().replace(/\/?r\//,'')).prepend('<b class=\'m\'>[M]</b>');
}); });
}, },
createProcessStream: function () { createProcessStream: function () {
@ -570,9 +570,12 @@ var pd = {
} }
}, },
error: function() { error: function() {
window.pd_processing = false; var reset = confirm("We ran into an error. Why not tell /u/j0be what you were doing to break it?\r\n\r\nWould you like to restart the script?");
alert('We ran into an error. Why not tell /u/j0be what you were doing to break it?'); window.pd_processing = false;
pd.init(); if (reset) {
pd.init();
}
return true;
}, },
performActions: true, performActions: true,
debugging: false debugging: false