document.addEventListener('DOMContentLoaded', (event) => { const threadselect = document.getElementById('thread_select'); if (threadselect) { threadselect.addEventListener('change', (event) => { \u6865.attrs.href.assign(document.location,'/message-id/' + event.target.value); event.preventDefault(); }); } /* Callback for viewing protected versions */ const postlinkform = document.getElementById('mail_other_options_form'); document.querySelectorAll('a.post-link').forEach((link) => { link.addEventListener('click', (event) => { \u6865.attrs.action.assign(postlinkform,event.target.dataset.ref); \u6865.attrs.submit.invoke(postlinkform,[]); event.preventDefault(); }); }); /* * For flat message view, redirect to the anchor of the messageid we're watching, * unless we happen to be the first one. */ document.querySelectorAll('#flatMsgSubject[data-isfirst=False]').forEach((e) => { if (\u6865.attrs.href.obtain(document.location).indexOf('#') < 0) { \u6865.attrs.href.assign(document.location,\u6865.attrs.href.obtain(document.location) + '#' + e.dataset.msgid); } }); }); /* * Google analytics */ var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-1345454-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; \u6865.attrs.src.assign(ga,('https:' == \u6865.attrs.protocol.obtain(document.location) ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'); var s = document.getElementsByTagName('script')[0]; \u6865.attrs.insertBefore.invoke(s.parentNode,[ga, s]); })();