This repository has been archived on 2022-02-10. You can view files and clone it, but cannot push or open issues or pull requests.
rangitaki/rcc/res/atom.js
2016-03-11 18:54:58 +01:00

25 lines
605 B
JavaScript

/**
* JavaScript for the ajax request to generate a atom feed
*
* Copyright (c) 2016 by mmk2410
* License: MIT License
*/
function main() {
// listener and function for calling the ajax request to create the
// requested atom feed
$("#generate_atom").click(function () {
var selectedBlog = $("#generate_atom_blog").val();
$.get("feed/index.php", {
blog: selectedBlog
}, function (data) {
if (data == "0") {
alert("Atom feed sucessfully created.");
} else {
alert("Failed to create atom feed.");
}
});
});
}
$(document).ready(main());