<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Snipplr</title>
    <description>Recent snippets posted on Snipplr.com</description>
    <link>https://snipplr.com/</link>
    <lastBuildDate>Tue, 09 Jun 2026 14:29:41 +0000</lastBuildDate>
    <item>
      <title>(JavaScript) Sort Gmail Messages By Sender - roryok</title>
      <link>https://snipplr.com/view/21960/sort-gmail-messages-by-sender</link>
      <description>&lt;p&gt;This is based on the [Sort Gmail Messages By Bookmarklet](http://snipplr.com/view/10432/sort-gmail-messages-by-subject/ "Sort Gmail Messages By Bookmarklet - http://snipplr.com/view/10432/sort-gmail-messages-by-subject/")  snippet.&#13;
&#13;
&#13;
Drag this into your Bookmarks: [SortGmailBySender](javascript:&amp;#40;function&amp;#40;&amp;#41;&amp;#123;function%20f&amp;#40;r&amp;#41;&amp;#123;var%20t=r.getElementsByTagName&amp;#40;&amp;#34;span&amp;#34;&amp;#41;;var%20i;for&amp;#40;i=0;i&lt;t.length;i++&amp;#41;&amp;#123;if&amp;#40;t[i].hasAttribute&amp;#40;&amp;#34;email&amp;#34;&amp;#41;&amp;#41;&amp;#123;return%20t[i].innerHTML&amp;#125;&amp;#125;return%20&amp;#34;&amp;#34;&amp;#125;function%20ds&amp;#40;a,b&amp;#41;&amp;#123;a=a[0].toLowerCase&amp;#40;&amp;#41;;b=b[0].toLowerCase&amp;#40;&amp;#41;;if&amp;#40;a&lt;b&amp;#41;return%20-1;if&amp;#40;a&gt;b&amp;#41;return%201;return%200&amp;#125;function%20sl&amp;#40;m&amp;#41;&amp;#123;var%20l=Array.prototype.slice.call&amp;#40;m.getElementsByTagName&amp;#40;&amp;#34;tr&amp;#34;&amp;#41;,0&amp;#41;;if&amp;#40;!l.length&amp;#41;return;var%20b=l[0].parentNode;var%20s=[];for&amp;#40;var%20i=0;i&lt;l.length;i++&amp;#41;&amp;#123;s[i]=[f&amp;#40;l[i]&amp;#41;,l[i]]&amp;#125;s=s.sort&amp;#40;ds&amp;#41;;for&amp;#40;i=0;i&lt;s.length;i++&amp;#41;&amp;#123;b.appendChild&amp;#40;s[i][1]&amp;#41;&amp;#125;&amp;#125;var%20m=document.getElementById&amp;#40;'canvas_frame'&amp;#41;.contentWindow.document.getElementById&amp;#40;&amp;#34;:on&amp;#34;&amp;#41;;if&amp;#40;m&amp;#41;sl&amp;#40;m&amp;#41;&amp;#125;&amp;#41;&amp;#40;&amp;#41; "SortGmailBySender Bookmarklet")&#13;
&#13;
&#13;
A few caveats of this snippet (and the original)&#13;
&#13;
1. This will screw up your checkbox selection order. Shift clicking to select multiple messages will no longer work until you refresh the view&#13;
2. If you archive or delete messages in this view, they will not disappear until you refresh gmail, but remember you can do a much lighter refresh by simply hitting the internal gmail 'refresh' link, rather than F5. &#13;
3. I had to change the table selector from ":op" in the original to ":on" in the new version. gmail code changes regularly so you may have to tweak code a little.&lt;/p&gt;</description>
      <pubDate>Tue, 27 Oct 2009 08:45:05 UTC</pubDate>
      <guid>https://snipplr.com/view/21960/sort-gmail-messages-by-sender</guid>
    </item>
  </channel>
</rss>
