diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.rhtml
index 6cd30439e..b361c3b8e 100644
--- a/app/views/layouts/default.rhtml
+++ b/app/views/layouts/default.rhtml
@@ -55,13 +55,30 @@
});
//-->
-
+
+
+
<%- end -%>
<%= auto_discovery_link_tag(:atom, {:controller => 'wiki', :web => @web.address, :action => 'atom_with_headlines'},
:title => 'Atom with headlines') %>
diff --git a/app/views/wiki/s5.rhtml b/app/views/wiki/s5.rhtml
index ffbe7407e..23c81f606 100644
--- a/app/views/wiki/s5.rhtml
+++ b/app/views/wiki/s5.rhtml
@@ -42,11 +42,26 @@
//-->
<%- end -%>
<%= javascript_include_tag "/s5/ui/core/slides.js" %>
diff --git a/public/javascripts/page_helper.js b/public/javascripts/page_helper.js
index 87705050f..d7332f97b 100644
--- a/public/javascripts/page_helper.js
+++ b/public/javascripts/page_helper.js
@@ -315,6 +315,20 @@ function initializeYoutubePlayer() {
}
}
+function columnAlignShim() {
+ var mtables = document.querySelectorAll('mtable[columnalign]');
+ for (var i = 0; i < mtables.length; i++) {
+ var mtable = mtables[i];
+ var colAligns = mtable.getAttribute('columnalign').split(/\s+/);
+ if (colAligns.length > 1) {
+ var mtds = mtable.querySelectorAll(':scope > mtr > mtd');
+ for (var j = 0; j < mtds.length; j++) {
+ mtds[j].style.textAlign = colAligns[j];
+ }
+ }
+ }
+}
+
document.observe("dom:loaded", function (){
extractBlockquoteCitations();
fixRunIn();
@@ -323,4 +337,5 @@ document.observe("dom:loaded", function (){
embedCDFs();
retrieveTexSource();
initializeYoutubePlayer();
+ columnAlignShim();
});
diff --git a/public/stylesheets/instiki.css b/public/stylesheets/instiki.css
index 936a9a277..6131b5a56 100644
--- a/public/stylesheets/instiki.css
+++ b/public/stylesheets/instiki.css
@@ -516,11 +516,6 @@ span.theorem_label {font-style:normal; font-weight:bold;}
[actiontype="toggle"]:hover {text-shadow: #ccc 2px 2px 5px;}
.maruku_toc ul { list-style: none; }
-/* hack to work around https://bugs.webkit.org/show_bug.cgi?id=160075 */
-[columnalign="right left right left right left right left right left"] mtd:nth-child(2n+1) {text-align: right;}
-[columnalign="right left right left right left right left right left"] mtd:nth-child(2n+0) {text-align: left;}
-[columnalign="left left"] mtd {text-align:left;}
-
/* The STIX Two fonts are licensed under the SIL Open Font License, Version 1.1, http://scripts.sil.org/OFL */
math {font-family: STIX Two Math;}
mtext {font-family: STIX Two Text;}