@ -808,63 +808,5 @@ const Helpers = {
console . log ( "export" ) ;
console . log ( "export" ) ;
window . open ( "backend.php?op=opml&method=export&" + dojo . formToQuery ( "opmlExportForm" ) ) ;
window . open ( "backend.php?op=opml&method=export&" + dojo . formToQuery ( "opmlExportForm" ) ) ;
} ,
} ,
publish : function ( ) {
Notify . progress ( "Loading, please wait..." , true ) ;
xhr . json ( "backend.php" , { op : "pref-feeds" , method : "getOPMLKey" } , ( reply ) => {
try {
const dialog = new fox . SingleUseDialog ( {
title : _ _ ( "Public OPML URL" ) ,
regenOPMLKey : function ( ) {
if ( confirm ( _ _ ( "Replace current OPML publishing address with a new one?" ) ) ) {
Notify . progress ( "Trying to change address..." , true ) ;
xhr . json ( "backend.php" , { op : "pref-feeds" , method : "regenOPMLKey" } , ( reply ) => {
if ( reply ) {
const new _link = reply . link ;
const target = this . domNode . querySelector ( '.generated_url' ) ;
if ( new _link && target ) {
target . href = new _link ;
target . innerHTML = new _link ;
Notify . close ( ) ;
} else {
Notify . error ( "Could not change feed URL." ) ;
}
}
} ) ;
}
return false ;
} ,
content : `
< header > $ { _ _ ( "Your Public OPML URL is:" ) } < / h e a d e r >
< section >
< div class = 'panel text-center' >
< a class = 'generated_url' href = "${App.escapeHtml(reply.link)}" target = '_blank' > $ { App . escapeHtml ( reply . link ) } < / a >
< / d i v >
< / s e c t i o n >
< footer class = 'text-center' >
< button dojoType = 'dijit.form.Button' onclick = "return App.dialogOf(this).regenOPMLKey()" >
$ { App . FormFields . icon ( "refresh" ) }
$ { _ _ ( 'Generate new URL' ) }
< / b u t t o n >
< button dojoType = 'dijit.form.Button' type = 'submit' class = 'alt-primary' >
$ { _ _ ( 'Close this window' ) }
< / b u t t o n >
< / f o o t e r >
`
} ) ;
dialog . show ( ) ;
Notify . close ( ) ;
} catch ( e ) {
App . Error . report ( e ) ;
}
} ) ;
} ,
}
}
} ;
} ;