1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2024-10-27 20:34:16 +00:00

handle missing category query arg

This commit is contained in:
gnosygnu 2017-03-12 17:26:52 -04:00
parent 30b7f64df8
commit 4c9843b327
2 changed files with 6 additions and 2 deletions

View File

@ -68,8 +68,8 @@
<body onload="wm.category.run();"> <body onload="wm.category.run();">
Example urls: Example urls:
<ul> <ul>
<li><a href='http://xowa.org/wikimedia.html?domain=en.wikipedia.org&category=Earth'>http://xowa.org/wikimedia.html?domain=en.wikipedia.org&category=Earth</a></li> <li><a href='http://xowa.org/demo/wikimedia.html?domain=en.wikipedia.org&category=Earth'>http://xowa.org/demo/wikimedia.html?domain=en.wikipedia.org&category=Earth</a></li>
<li><a href='http://xowa.org/wikimedia.html?domain=en.wikipedia.org&category=Coffee'>http://xowa.org/wikimedia.html?domain=en.wikipedia.org&category=Coffee</a></li> <li><a href='http://xowa.org/demo/wikimedia.html?domain=en.wikipedia.org&category=Coffee'>http://xowa.org/demo/wikimedia.html?domain=en.wikipedia.org&category=Coffee</a></li>
</ul> </ul>
</body> </body>
</html> </html>

View File

@ -42,6 +42,10 @@
if (domain) if (domain)
wm.category.domain = domain; wm.category.domain = domain;
// handle bare url
if (!wm.category.category_title)
return;
// write status // write status
wm.category.writeHtml('<div class="header_div">Evaluating Category:' + wm.category.category_title + '. Please wait...</div>'); wm.category.writeHtml('<div class="header_div">Evaluating Category:' + wm.category.category_title + '. Please wait...</div>');