Skip to content

Instantly share code, notes, and snippets.

@myfreeer
Last active December 1, 2016 13:23
Show Gist options
  • Save myfreeer/6c5dd2b24a67b4ddcf49d3202f084e24 to your computer and use it in GitHub Desktop.
Save myfreeer/6c5dd2b24a67b4ddcf49d3202f084e24 to your computer and use it in GitHub Desktop.
按发帖时间排序小书签,对discuz特别的优化
javascript:void((function(){if(/\#tabA|-orderway-|orderby=/.test(location.href))return;var bydate = document.querySelectorAll('#filter_dateline_menu > .pop_moremenu a[href*="orderby=dateline"], #filter_threadsort_menu > .pop_moremenu a[href*="orderby=dateline"], #filter_orderby_menu a[href*="orderby=dateline"], .colplural .author a[href*="orderby=dateline"], a[href$="orderby=dateline"]') || document.querySelectorAll('.content_filter a[href*="orderby=postdate"], .thread_sort a[href*="orderway"][href*="postdate"], #threadlist .mr20 a[href][onclick^="orderThreads(\'postdate\')"]'); for(var i in bydate) if (bydate[i].href&&bydate[i].href.match(location.href.match(/(fid=|forum-)([0-9]+)/)[2]))location.href=bydate[i].href;})())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment