summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2013-03-22 21:26:19 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2013-03-22 21:26:19 +0100
commitf42bc98eefea7e7f113070bb5b9081f14bc3684a (patch)
tree1ee7d0c64ea2ebb1b10c0cb03fe88bed086545e2
parenta89c396c01398878f69e4c4a191a8b32ac080646 (diff)
downloadwebsite-f42bc98eefea7e7f113070bb5b9081f14bc3684a.tar.gz
website-f42bc98eefea7e7f113070bb5b9081f14bc3684a.tar.bz2
website-f42bc98eefea7e7f113070bb5b9081f14bc3684a.tar.xz
website-f42bc98eefea7e7f113070bb5b9081f14bc3684a.zip
Use jQuery to dynamically load the news into the static site
For this to work, the news.html file needs to be served with the header Access-Control-Allow-Origin, in order to allow the site to display it. Something like that in a .htaccess file should do: <FilesMatch "news.html$"> <IfModule mod_headers.c> Header set Access-Control-Allow-Origin "*" </IfModule> </FilesMatch>
-rw-r--r--index.html11
1 files changed, 8 insertions, 3 deletions
diff --git a/index.html b/index.html
index 561f372..b19823e 100644
--- a/index.html
+++ b/index.html
@@ -7,6 +7,11 @@ title: News
<b>Notice:</b> New account creation disabled due to excessive abuse of this feature. If you want to sign up, contact thorbjorn or Jaxad0127 on IRC for now.
</div>
-->
-<!--
- TODO: Load http://updates.themanaworld.org/news.html here
--->
+
+<div id="news">
+</div>
+
+<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
+<script type="text/javascript">
+$('#news').load('http://updates.themanaworld.org/news.html');
+</script>