Pages:
Author

Topic: Enhanced merit UI [1.1] - page 2. (Read 2992 times)

sr. member
Activity: 1148
Merit: 307
March 25, 2018, 03:41:25 AM
#19
I have combined my own suggestion as well as sncc's and modified grue's script to implement them.

This is the result:
Loading image...


Thanks for this upgrade, it was absolutely necessary. Not knowing how many sMerits you still have when you are about to give one was not an option, given their overall scarcity (most people have just a few sMerits).
member
Activity: 140
Merit: 12
February 28, 2018, 05:18:35 AM
#18
Awesome, the landlord is really a technology expert, this must support, will not be so troublesome later.
hero member
Activity: 840
Merit: 962
HOLD BITCOIN! Fiat - SCAM!
February 28, 2018, 02:52:52 AM
#17
This is a very simple userscript that allows you to add merit without leaving the page. Click on the "+Merit" link to open/close the popup.



Download: Merit.user.js

Installation:

Changelog:
1.0: release
1.1: fix csrf token not working when quick reply is disabled. (thanks minifrij)

Thank you, this is very nice script. When will more merit - I will definitely use it!

sr. member
Activity: 530
Merit: 250
CryptoTalk.Org - Get Paid for every Post!
February 23, 2018, 07:36:08 PM
#16
Great addition! This was required especially in the light of the changes to the merit system. I just found about the merit system today and was looking for a way to give merits easily.


Is it possible to integrate this into the forum itself? Using some simple machines plugin maybe?
full member
Activity: 448
Merit: 110
February 23, 2018, 03:06:01 PM
#15
Thankyou for this it worked smoothly, really useful for me bc i hate the fact that new tab is opening for clicking the merit!
legendary
Activity: 1876
Merit: 1475
February 23, 2018, 01:58:58 PM
#14
I have combined my own suggestion as well as sncc's and modified grue's script to implement them.

This is the result:
Loading image...

The available sMerit points are shown. 'Available' is a link which opens the default https://bitcointalk.org/index.php?action=merit;msg=30923337 (with the corresponding msg) in a new window to keep the original functionality.

Here's the modified source. grue, feel free to update your original code if you like the change:
Code:
// ==UserScript==
// @name        bitcointalk merit
// @namespace   grue
// @include     https://bitcointalk.org/index.php?topic=*
// @require     https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.3.1.min.js
// @version     1.1-em0.1
// @downloadURL https://grue.blob.core.windows.net/scripts/Merit.user.js?sv=2014-02-14&si=1&sr=c&sig=k%2BqstGBI3oQ8TrHfPWjS5HgjrazuDPmKJ6rYNs7rvRk%3D&.user.js
// @grant none
// ==/UserScript==

(() => {
  var sMerit;
  
  //get csrf token from the logout link
  let sc = $('td.maintab_back a[href*="index.php?action=logout;sesc="').attr("href");
  sc = /;sesc=(.*)/.exec(sc)[1];
  
  //Added by EcuaMobi: Get remaining sMerit
  $.post(
"https://bitcointalk.org/index.php?action=merit;msg=29048068"
  ).then((data) => {
    sMerit = /You have ([0-9]+)<\/b> sendable/.exec(data)[1];
  }).catch(() => sMerit = null);

  //selector for the "+Merit" link
  $('td.td_headerandpost div[id^=ignmsgbttns] a[href*="index.php?action=merit;msg="]')
  .each((i, e) => {
    const msgId = /msg=([0-9]+)/.exec(e.href)[1];
    
    const $popup = $(['
',
      '  
',
      '    
',
      '      Merit points: ',
      '    
',
 // Modified by EcuaMobi
      '    
',
      '  
',
      '
'
    ].join("\n"));
    $popup.find("form").submit( (e) => {
      e.preventDefault();
      $popup.find('input[type="submit"]')
        .prop("disabled", true)
        .val("Sending...");
      const merits = e.target.elements["merits"].value;
      
      $.post(
        "https://bitcointalk.org/index.php?action=merit",
        {merits, msgID: msgId, sc}
      ).then((data) => {
        //Error pages usually have this (rough heuristic)
        if(data.includes("An Error Has Occurred!</title")) {<br />          throw "error";<br />        }<br />        //double check and see whether the post we merited was added to the list. Its msgId should be visible in the page source.<br />        if(data.includes("#msg" + msgId)) {<br />          alert("Merit added.");<br />          $("#grue-merit-popup" + msgId).toggle(false);<br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span>  // Added by EcuaMobi<br /><span style="white-space: pre;"> </span><span style="white-space: pre;"> </span>  if(sMerit!=null) { sMerit -= merits }<br />          return;<br />        }<br />        alert("Server response indeterminate.");<br />      })<br />      .catch(() => alert("Failed to add merit."))<br />      .always(() => {<br />        $popup.find('input[type="submit"]')<br />        .prop("disabled", false)<br />        .val("Send");<br />      });<br />    });<br />    $popup.insertAfter(e);<br />    <br />    $(e).click((e) => {<br />      e.preventDefault();<br />      $("#grue-merit-popup" + msgId).toggle();<br /><span style="white-space: pre;"> </span>  // Added by EcuaMobi<br /><span style="white-space: pre;"> </span>  if(sMerit!=null) { $("#em-smerit-count" + msgId).html('<a href="https://bitcointalk.org/index.php?action=merit;msg='+msgId+'" rel="nofollow" target="_blank">Available:</a> <b>'+sMerit+'</b>    ') };<br />    });<br />  });<br />   $(".grue-merit-popup").toggle(false);<br />   <br />})();</div>I've clearly marked the modified code with either "Added by EcuaMobi" or "Modified by EcuaMobi". I also changed the version<br /><br />A small limitation is that it queries the available sMerit points once (when the thread is loaded). It does subtract them when points are sent. However, if sMerit points are received the change won't be reflected unless the page is reloaded. That would require re-querying every time which I considered an overkill.<br /><br />To install this version, you can just modify grue's script or install this from scratch:<br /><a class="ul" href="https://openuserjs.org/scripts/EcuaMobi/bitcointalk_merit" rel="nofollow" target="_blank">https://openuserjs.org/scripts/EcuaMobi/bitcointalk_merit</a><br /><br />(grue, I assumed this code is open-source. If that's not the case, let me know to unpublish this) </div> </div> </div> </div> <div class="item clearfix"> <div class="item-content"> <div class="user-data"> <div class="username"> <a href="/user/ungvantuyen-1292775" title="Profile of ungvantuyen">ungvantuyen</a> </div> <div class="position">newbie</div> <div class="position-coins"> <img src="/images/user_position/star.gif" alt=""> </div> <div class="activity">Activity: 49</div> <div class="merit">Merit: 0</div> <div class="avatar"> </div> <div class="description"></div> <div class="view-profile"> <a href="/user/ungvantuyen-1292775" title="Profile of ungvantuyen"><img src="/images/profile_sm.gif" alt=""></a> </div> </div> <div class="message-data"> <div class="header clearfix"> <div class="icon"> <img src="/images/xx.gif" alt=""> </div> <div class="title-wrapper"> <div class="title"> <a name="msg30181367"></a> <a href="/topic/m.30181367">Re: Enhanced merit UI [1.1]</a> </div> <div class="date">February 13, 2018, 12:40:47 AM</div> </div> <div class="item-number text-right"> <a href="/topic/m.30181367">#13</a> </div> </div> <div class="content"> Thanks Chris for the great works. How about drop-down list of meriters correspond to number of merits they sent. It will help to clear appearance of topics and threads that have abundant meriters. I don't remember the source of the idea, but I read about the idea somewhere in the ground. </div> </div> </div> </div> <div class="item clearfix"> <div class="item-content"> <div class="user-data"> <div class="username"> <a href="/user/fabianji-1605084" title="Profile of fabianji">fabianji</a> </div> <div class="position">member</div> <div class="position-coins"> <img src="/images/user_position/star.gif" alt=""> <img src="/images/user_position/star.gif" alt=""> </div> <div class="activity">Activity: 70</div> <div class="merit">Merit: 12</div> <div class="avatar"> </div> <div class="description"></div> <div class="view-profile"> <a href="/user/fabianji-1605084" title="Profile of fabianji"><img src="/images/profile_sm.gif" alt=""></a> </div> </div> <div class="message-data"> <div class="header clearfix"> <div class="icon"> <img src="/images/xx.gif" alt=""> </div> <div class="title-wrapper"> <div class="title"> <a name="msg30180812"></a> <a href="/topic/m.30180812">Re: Enhanced merit UI [1.1]</a> </div> <div class="date">February 13, 2018, 12:23:36 AM</div> </div> <div class="item-number text-right"> <a href="/topic/m.30180812">#12</a> </div> </div> <div class="content"> <div class="quote-header"><a href="/topic/m.29048068">Quote from: grue on January 27, 2018, 11:55:40 AM</a></div><div class="quote">This is a very simple userscript that allows you to add merit without leaving the page. Click on the "+Merit" link to open/close the popup.<br /></div><br />Amazing - thank you!<br /><br /> </div> </div> </div> </div> <div class="item clearfix"> <div class="item-content"> <div class="user-data"> <div class="username"> <a href="/user/benonceagain-1109403" title="Profile of BenOnceAgain">BenOnceAgain</a> </div> <div class="position">member</div> <div class="position-coins"> <img src="/images/user_position/star.gif" alt=""> <img src="/images/user_position/star.gif" alt=""> </div> <div class="activity">Activity: 208</div> <div class="merit">Merit: 84</div> <div class="avatar"> </div> <div class="description">🌐 www.btric.org 🌐</div> <div class="view-profile"> <a href="/user/benonceagain-1109403" title="Profile of BenOnceAgain"><img src="/images/profile_sm.gif" alt=""></a> </div> </div> <div class="message-data"> <div class="header clearfix"> <div class="icon"> <img src="/images/xx.gif" alt=""> </div> <div class="title-wrapper"> <div class="title"> <a name="msg30163767"></a> <a href="/topic/m.30163767">Re: Enhanced merit UI [1.1]</a> </div> <div class="date">February 12, 2018, 03:33:12 PM</div> </div> <div class="item-number text-right"> <a href="/topic/m.30163767">#11</a> </div> </div> <div class="content"> <div class="quote-header"><a href="/topic/m.29048068">Quote from: grue on January 27, 2018, 11:55:40 AM</a></div><div class="quote">This is a very simple userscript that allows you to add merit without leaving the page. Click on the "+Merit" link to open/close the popup.<br /></div><br />Hi grue, thank you very much for the great script!<br /><br />Best regards,<br />Ben </div> </div> </div> </div> <div class="item clearfix"> <div class="item-content"> <div class="user-data"> <div class="username"> <a href="/user/akamit-782831" title="Profile of akamit">akamit</a> </div> <div class="position">hero member</div> <div class="position-coins"> <img src="/images/user_position/star.gif" alt=""> <img src="/images/user_position/star.gif" alt=""> <img src="/images/user_position/star.gif" alt=""> <img src="/images/user_position/star.gif" alt=""> <img src="/images/user_position/star.gif" alt=""> </div> <div class="activity">Activity: 1498</div> <div class="merit">Merit: 596</div> <div class="avatar"> </div> <div class="description"></div> <div class="view-profile"> <a href="/user/akamit-782831" title="Profile of akamit"><img src="/images/profile_sm.gif" alt=""></a> </div> </div> <div class="message-data"> <div class="header clearfix"> <div class="icon"> <img src="/images/xx.gif" alt=""> </div> <div class="title-wrapper"> <div class="title"> <a name="msg30162452"></a> <a href="/topic/m.30162452">Re: Enhanced merit UI [1.1]</a> </div> <div class="date">February 12, 2018, 03:08:47 PM</div> </div> <div class="item-number text-right"> <a href="/topic/m.30162452">#10</a> </div> </div> <div class="content"> Great job Grue! A useful script for lazy guys. <br />I hope lazy guys will not hesitate anymore to merit someone's post now and then or will be able to show another excuse.<br /><br />A responsible bump for the lazy mates, those who have waited long for this.  <img src="https://bitcointalk.org/Smileys/default/wink.gif" alt="Wink" border="0" /> </div> </div> </div> </div> <div class="item clearfix"> <div class="item-content"> <div class="user-data"> <div class="username"> <a href="/user/vod-30747" title="Profile of Vod">Vod</a> </div> <div class="position">legendary</div> <div class="position-coins"> <img src="/images/user_position/legendary.gif" alt="" title="Legendary level"> </div> <div class="activity">Activity: 3668</div> <div class="merit">Merit: 3010</div> <div class="avatar"> <img src="https://bitcointalk.org/useravatars/avatar_30747.png" alt="" title="Profile photo of Vod"> </div> <div class="description">Licking my boob since 1970</div> <div class="view-profile"> <a href="/user/vod-30747" title="Profile of Vod"><img src="/images/profile_sm.gif" alt=""></a> </div> </div> <div class="message-data"> <div class="header clearfix"> <div class="icon"> <img src="/images/xx.gif" alt=""> </div> <div class="title-wrapper"> <div class="title"> <a name="msg29834499"></a> <a href="/topic/m.29834499">Re: Enhanced merit UI [1.1]</a> </div> <div class="date">February 08, 2018, 12:20:13 AM</div> </div> <div class="item-number text-right"> <a href="/topic/m.29834499">#9</a> </div> </div> <div class="content"> Nice userscript!!<br /><br />I won't be using it, as I like the info presented in a new window when I click the merit button.  <img src="https://bitcointalk.org/Smileys/default/smiley.gif" alt="Smiley" border="0" /> </div> </div> </div> </div> <div class="item clearfix"> <div class="item-content"> <div class="user-data"> <div class="username"> <a href="/user/adrianto1995-1079932" title="Profile of adrianto1995">adrianto1995</a> </div> <div class="position">full member</div> <div class="position-coins"> <img src="/images/user_position/star.gif" alt=""> <img src="/images/user_position/star.gif" alt=""> <img src="/images/user_position/star.gif" alt=""> </div> <div class="activity">Activity: 714</div> <div class="merit">Merit: 160</div> <div class="avatar"> <img src="https://bitcointalk.org/useravatars/avatar_1079932.png" alt="" title="Profile photo of adrianto1995"> </div> <div class="description"></div> <div class="view-profile"> <a href="/user/adrianto1995-1079932" title="Profile of adrianto1995"><img src="/images/profile_sm.gif" alt=""></a> </div> </div> <div class="message-data"> <div class="header clearfix"> <div class="icon"> <img src="/images/xx.gif" alt=""> </div> <div class="title-wrapper"> <div class="title"> <a name="msg29834419"></a> <a href="/topic/m.29834419">Re: Enhanced merit UI [1.1]</a> </div> <div class="date">February 08, 2018, 12:17:47 AM</div> </div> <div class="item-number text-right"> <a href="/topic/m.29834419">#8</a> </div> </div> <div class="content"> oh man you da real MVP<br /><br />it really helpful a lot, especially for low speed internet connection users like me...  <img src="https://bitcointalk.org/Smileys/default/smiley.gif" alt="Smiley" border="0" /><br />i will try it when i got my sMerit back...<br /> </div> </div> </div> </div> <div class="item clearfix"> <div class="item-content"> <div class="user-data"> <div class="username"> <a href="/user/sncc-1560793" title="Profile of sncc">sncc</a> </div> <div class="position">hero member</div> <div class="position-coins"> <img src="/images/user_position/star.gif" alt=""> <img src="/images/user_position/star.gif" alt=""> <img src="/images/user_position/star.gif" alt=""> <img src="/images/user_position/star.gif" alt=""> <img src="/images/user_position/star.gif" alt=""> </div> <div class="activity">Activity: 536</div> <div class="merit">Merit: 513</div> <div class="avatar"> </div> <div class="description"></div> <div class="view-profile"> <a href="/user/sncc-1560793" title="Profile of sncc"><img src="/images/profile_sm.gif" alt=""></a> </div> </div> <div class="message-data"> <div class="header clearfix"> <div class="icon"> <img src="/images/xx.gif" alt=""> </div> <div class="title-wrapper"> <div class="title"> <a name="msg29798554"></a> <a href="/topic/m.29798554">Re: Enhanced merit UI [1.1]</a> </div> <div class="date">February 07, 2018, 10:30:12 AM</div> </div> <div class="item-number text-right"> <a href="/topic/m.29798554">#7</a> </div> </div> <div class="content"> Thank you, this is very nice UI.<br />Adding stats link would be interesting but imho it would be more useful if one could check his/her own (not others') sMerit balance when trying to send Merit. <br />Could you implement it like this image?<br /><img class="userimg" src="https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FN9Piytz.png&t=667&c=FstN3JNgzkmW_Q" alt="" border="0" /> </div> </div> </div> </div> <div class="item clearfix"> <div class="item-content"> <div class="user-data"> <div class="username"> <a href="/user/ecuamobi-169515" title="Profile of EcuaMobi">EcuaMobi</a> </div> <div class="position">legendary</div> <div class="position-coins"> <img src="/images/user_position/legendary.gif" alt="" title="Legendary level"> </div> <div class="activity">Activity: 1876</div> <div class="merit">Merit: 1475</div> <div class="avatar"> <img src="https://bitcointalk.org/useravatars/avatar_169515.png" alt="" title="Profile photo of EcuaMobi"> </div> <div class="description"></div> <div class="view-profile"> <a href="/user/ecuamobi-169515" title="Profile of EcuaMobi"><img src="/images/profile_sm.gif" alt=""></a> </div> </div> <div class="message-data"> <div class="header clearfix"> <div class="icon"> <img src="/images/xx.gif" alt=""> </div> <div class="title-wrapper"> <div class="title"> <a name="msg29410086"></a> <a href="/topic/m.29410086">Re: Enhanced merit UI [1.1]</a> </div> <div class="date">February 01, 2018, 03:24:31 PM</div> </div> <div class="item-number text-right"> <a href="/topic/m.29410086">#6</a> </div> </div> <div class="content"> Thanks for this!<br />I just found it and it's really useful. So here's a little bump for others to find it.<br /><br />Also, could you add a small link to own Merit stats (<a class="ul" href="https://bitcointalk.org/index.php?action=merit" rel="nofollow" target="_blank">https://bitcointalk.org/index.php?action=merit</a>) ?<br />Sometimes I used to click "+Merit" just to go there.<br /><br /><a class="ul" href="https://bitcointalk.org/index.php?action=merit" rel="nofollow" target="_blank"><img class="userimg" src="https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2F6rMzj0t.png&t=667&c=163AOBzECO42og" alt="" border="0" /></a><br /><br /><b>Edit</b>:<br />I just realized I posted the wrong link. I meant <b>own</b> Metir stats.<br />Something like <a class="ul" href="https://bitcointalk.org/index.php?action=merit;msg=29410086" rel="nofollow" target="_blank">https://bitcointalk.org/index.php?action=merit;msg=29410086</a> (with the corresponding msg) </div> </div> </div> </div> <div class="item clearfix"> <div class="item-content"> <div class="user-data"> <div class="username"> <a href="/user/bluefirecorp-1047996" title="Profile of bluefirecorp_">bluefirecorp_</a> </div> <div class="position">full member</div> <div class="position-coins"> <img src="/images/user_position/star.gif" alt=""> <img src="/images/user_position/star.gif" alt=""> <img src="/images/user_position/star.gif" alt=""> </div> <div class="activity">Activity: 574</div> <div class="merit">Merit: 152</div> <div class="avatar"> </div> <div class="description"></div> <div class="view-profile"> <a href="/user/bluefirecorp-1047996" title="Profile of bluefirecorp_"><img src="/images/profile_sm.gif" alt=""></a> </div> </div> <div class="message-data"> <div class="header clearfix"> <div class="icon"> <img src="/images/xx.gif" alt=""> </div> <div class="title-wrapper"> <div class="title"> <a name="msg29070022"></a> <a href="/topic/m.29070022">Re: Enhanced merit UI [1.1]</a> </div> <div class="date">January 27, 2018, 07:55:13 PM</div> </div> <div class="item-number text-right"> <a href="/topic/m.29070022">#5</a> </div> </div> <div class="content"> Much better than my suggestion here; <a class="ul" href="/topic/m.28914391">https://bitcointalksearch.org/topic/m.28914391</a><br /><br />Good job. Didn't know you worked for Microsoft (that windows.net link >_>) </div> </div> </div> </div> <div class="item clearfix"> <div class="item-content"> <div class="user-data"> <div class="username"> <a href="/user/grue-5797" title="Profile of grue">grue</a> </div> <div class="position">legendary</div> <div class="position-coins"> <img src="/images/user_position/legendary.gif" alt="" title="Legendary level"> </div> <div class="activity">Activity: 2058</div> <div class="merit">Merit: 1452</div> <div class="avatar"> <img src="https://bitcointalk.org/useravatars/avatar_5797.png" alt="" title="Profile photo of grue"> </div> <div class="description"></div> <div class="view-profile"> <a href="/user/grue-5797" title="Profile of grue"><img src="/images/profile_sm.gif" alt=""></a> </div> </div> <div class="message-data"> <div class="header clearfix"> <div class="icon"> <img src="/images/xx.gif" alt=""> </div> <div class="title-wrapper"> <div class="title"> <a name="msg29056529"></a> <a href="/topic/m.29056529">Re: Enhanced merit UI [1.1]</a> </div> <div class="date">January 27, 2018, 02:19:09 PM</div> </div> <div class="item-number text-right"> <a href="/topic/m.29056529">#4</a> </div> </div> <div class="content"> <div class="quote-header"><a href="/topic/m.29051576">Quote from: minifrij on January 27, 2018, 12:52:17 PM</a></div><div class="quote">Great script grue, thanks!<br /><br />Just a little thing though, when I tried installing and using the script it would tell me 'Failed to give merit' whenever I tried to reward it. I found that this was a session error due to how you get 'sc'. <br />I've made a small fix here (on lines 12-14), which works for me currently:<br /><div class="codeheader">Code:</div><div class="code">  //get csrf token<br />  var sc = $('input[name="sc"][type="hidden"]').val();<br />  sc = (!sc ? ($('a[onclick]')[1].href).split('sesc=')[1] : sc);<br /></div></div>thanks. turns out that if you don't have quick reply enabled, the input with the token isn't there. i updated the script to use the token from the logout link (which should always be there). </div> </div> </div> </div> <div class="item clearfix"> <div class="item-content"> <div class="user-data"> <div class="username"> <a href="/user/lutpin-520313" title="Profile of Lutpin">Lutpin</a> </div> <div class="position">copper member</div> <div class="position-coins"> <img src="/images/user_position/star.gif" alt=""> </div> <div class="activity">Activity: 1904</div> <div class="merit">Merit: 1874</div> <div class="avatar"> <img src="https://bitcointalk.org/useravatars/avatar_520313.jpg" alt="" title="Profile photo of Lutpin"> </div> <div class="description">Goodbye, Z.</div> <div class="view-profile"> <a href="/user/lutpin-520313" title="Profile of Lutpin"><img src="/images/profile_sm.gif" alt=""></a> </div> </div> <div class="message-data"> <div class="header clearfix"> <div class="icon"> <img src="/images/xx.gif" alt=""> </div> <div class="title-wrapper"> <div class="title"> <a name="msg29054756"></a> <a href="/topic/m.29054756">Re: Enhanced merit UI [1.1]</a> </div> <div class="date">January 27, 2018, 01:47:38 PM</div> </div> <div class="item-number text-right"> <a href="/topic/m.29054756">#3</a> </div> </div> <div class="content"> <div class="quote-header"><a href="/topic/m.29051576">Quote from: minifrij on January 27, 2018, 12:52:17 PM</a></div><div class="quote">Great script grue, thanks!<br /><br />Just a little thing though, when I tried installing and using the script it would tell me 'Failed to give merit' whenever I tried to reward it. I found that this was a session error due to how you get 'sc'. <br />I've made a small fix here (on lines 12-14), which works for me currently:<br /><div class="codeheader">Code:</div><div class="code">  //get csrf token<br />  var sc = $('input[name="sc"][type="hidden"]').val();<br />  sc = (!sc ? ($('a[onclick]')[1].href).split('sesc=')[1] : sc);<br /></div></div>Getting the same error, great you already spotted and fixed it <img src="https://bitcointalk.org/Smileys/default/smiley.gif" alt="Smiley" border="0" /><br />Also, very well done grue, the extra page to open when giving merit was one of the most criticized aspect of this change.<br />Thanks! </div> </div> </div> </div> <div class="item clearfix"> <div class="item-content"> <div class="user-data"> <div class="username"> <a href="/user/minifrij-138940" title="Profile of minifrij">minifrij</a> </div> <div class="position">legendary</div> <div class="position-coins"> <img src="/images/user_position/legendary.gif" alt="" title="Legendary level"> </div> <div class="activity">Activity: 2352</div> <div class="merit">Merit: 1267</div> <div class="avatar"> <img src="https://bitcointalk.org/useravatars/avatar_138940.png" alt="" title="Profile photo of minifrij"> </div> <div class="description">In Memory of Zepher</div> <div class="view-profile"> <a href="/user/minifrij-138940" title="Profile of minifrij"><img src="/images/profile_sm.gif" alt=""></a> </div> </div> <div class="message-data"> <div class="header clearfix"> <div class="icon"> <img src="/images/xx.gif" alt=""> </div> <div class="title-wrapper"> <div class="title"> <a name="msg29051576"></a> <a href="/topic/m.29051576">Re: Enhanced merit UI [1.1]</a> </div> <div class="date">January 27, 2018, 12:52:17 PM</div> </div> <div class="item-number text-right"> <a href="/topic/m.29051576">#2</a> </div> </div> <div class="content"> Great script grue, thanks!<br /><br />Just a little thing though, when I tried installing and using the script it would tell me 'Failed to give merit' whenever I tried to reward it. I found that this was a session error due to how you get 'sc'. <br />I've made a small fix here (on lines 12-14), which works for me currently:<br /><div class="codeheader">Code:</div><div class="code">  //get csrf token<br />  var sc = $('input[name="sc"][type="hidden"]').val();<br />  sc = (!sc ? ($('a[onclick]')[1].href).split('sesc=')[1] : sc);<br /></div> </div> </div> </div> </div> <div class="item clearfix"> <div class="item-content"> <div class="user-data"> <div class="username"> <a href="/user/grue-5797" title="Profile of grue">grue</a> </div> <div class="position">legendary</div> <div class="position-coins"> <img src="/images/user_position/legendary.gif" alt="" title="Legendary level"> </div> <div class="activity">Activity: 2058</div> <div class="merit">Merit: 1452</div> <div class="avatar"> <img src="https://bitcointalk.org/useravatars/avatar_5797.png" alt="" title="Profile photo of grue"> </div> <div class="description"></div> <div class="view-profile"> <a href="/user/grue-5797" title="Profile of grue"><img src="/images/profile_sm.gif" alt=""></a> </div> </div> <div class="message-data"> <div class="header clearfix"> <div class="icon"> <img src="/images/xx.gif" alt=""> </div> <div class="title-wrapper"> <div class="title"> <a name="msg29048068"></a> <a href="/topic/m.29048068">Re: Enhanced merit UI [1.1]</a> </div> <div class="date">January 27, 2018, 11:55:40 AM</div> </div> <div class="item-number text-right"> <a href="/topic/m.29048068">#1</a> </div> </div> <div class="content"> This is a very simple userscript that allows you to add merit without leaving the page. Click on the "+Merit" link to open/close the popup.<br /><br /><img class="userimg" src="https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FEfAEkBQ.png&t=667&c=F1Uo9FAybHlTcQ" alt="" border="0" /><br /><br />Download: <a class="ul" href="https://github.com/grue0/bitcointalk-scripts/blob/master/Merit.user.js" rel="nofollow" target="_blank">Merit.user.js</a><br /><br />Installation:<br /><ul style="margin-top: 0; margin-bottom: 0; list-style-type: decimal;"><li>If you haven't already, install <a class="ul" href="https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/" rel="nofollow" target="_blank">greasemonkey (firefox)</a>, or <a class="ul" href="https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo" rel="nofollow" target="_blank">tampermonkey (chrome)</a></li><li>Download the script</li></ul><br />Changelog:<br />1.0: release<br />1.1: fix csrf token not working when quick reply is disabled. <a class="ul" href="/topic/m.29051576">(thanks minifrij)</a><br />1.2: rehost file on github </div> </div> </div> </div> </div> <div class="pagination-wrapper"> <span class="pages-text ">Pages:</span> <ul class="pagination"><li class="prev"><a href="/topic/enhanced-merit-ui-11-2833350" data-page="0">«</a></li> <li><a href="/topic/enhanced-merit-ui-11-2833350" data-page="0">1</a></li> <li class="active"><a href="/topic/enhanced-merit-ui-11-2833350/2-page.html" data-page="1">2</a></li> <li class="next disabled"><span>»</span></li></ul> </div></div> </div> <div class="breadcrumbs"><a href="/" title="Home">Bitcoin Forum</a><span>></span><a href="/other-1000000004" title="Other category">Other</a><span>></span><a href="/meta-24" title="Meta category">Meta</a></div> <div class="jump-to pull-right"> <div class="inner"> <div class="content text-right"> <div class="text">Jump to: </div> <form id="jump-to-form" class="jump-to-form-class" action="/forum/default/jump-to-category" method="post"> <input type="hidden" name="_csrf-frontend" value="SGD_yGz-Q_Dwk2GupJ-sq8BF5P61NopGl59wnuYivms_E4n7Va4BmZbBJ5eSxdvsszWouOFV4nfPpyTLt3b1Gg=="> <select id="jumptoform-category_id" class="" name="JumpToForm[category_id]" aria-required="true"> <option value="">Please select a destination:</option> <option value="1000000001">Bitcoin</option> <option value="1">=> Bitcoin Discussion</option> <option value="74">===> Legal</option> <option value="77">===> Press</option> <option value="86">===> Meetups</option> <option value="87">===> Important Announcements</option> <option value="6">=> Development & Technical Discussion</option> <option value="37">===> Wallet software</option> <option value="98">=====> Electrum</option> <option value="100">=====> Bitcoin Wallet for Android</option> <option value="138">=====> BitcoinJ</option> <option value="97">=====> Armory</option> <option value="231">=====> Mycelium</option> <option value="261">=====> Hardware wallets</option> <option value="4">=> Bitcoin Technical Support</option> <option value="12">=> Project Development</option> <option value="14">=> Mining</option> <option value="40">===> Mining support</option> <option value="41">===> Pools</option> <option value="42">===> Mining software (miners)</option> <option value="76">===> Hardware</option> <option value="137">=====> Group buys</option> <option value="81">===> Mining speculation</option> <option value="1000000003">Economy</option> <option value="7">=> Economics</option> <option value="57">===> Speculation</option> <option value="5">=> Marketplace</option> <option value="53">===> Currency exchange</option> <option value="56">===> Gambling</option> <option value="71">=====> Games and rounds</option> <option value="207">=====> Investor-based games</option> <option value="228">=====> Gambling discussion</option> <option value="65">===> Lending</option> <option value="88">=====> Long-term offers</option> <option value="78">===> Securities</option> <option value="73">===> Auctions</option> <option value="84">===> Service Announcements</option> <option value="212">=====> Micro Earnings</option> <option value="85">===> Service Discussion</option> <option value="222">=====> Web Wallets</option> <option value="223">=====> Exchanges</option> <option value="51">===> Goods</option> <option value="75">=====> Computer hardware</option> <option value="93">=====> Digital goods</option> <option value="234">=======> Invites & Accounts</option> <option value="217">=====> Collectibles</option> <option value="52">===> Services</option> <option value="8">=> Trading Discussion</option> <option value="83">===> Scam Accusations</option> <option value="129">===> Reputation</option> <option value="1000000004">Other</option> <option value="24">=> Meta</option> <option value="167">===> New forum software</option> <option value="168">===> Bitcoin Wiki</option> <option value="39">=> Beginners & Help</option> <option value="9">=> Off-topic</option> <option value="250">=> Serious discussion</option> <option value="251">===> Ivory Tower</option> <option value="59">=> Archival</option> <option value="17">===> Chinese students</option> <option value="25">===> Obsolete (buying)</option> <option value="26">===> Obsolete (selling)</option> <option value="99">===> MultiBit</option> <option value="44">===> CPU/GPU Bitcoin mining hardware</option> <option value="92">===> Корзина</option> <option value="34">=> Politics & Society</option> <option value="1000000006">Alternate cryptocurrencies</option> <option value="67">=> Altcoin Discussion</option> <option value="159">=> Announcements (Altcoins)</option> <option value="240">===> Tokens (Altcoins)</option> <option value="160">=> Mining (Altcoins)</option> <option value="199">===> Pools (Altcoins)</option> <option value="161">=> Marketplace (Altcoins)</option> <option value="197">===> Service Announcements (Altcoins)</option> <option value="198">===> Service Discussion (Altcoins)</option> <option value="238">===> Bounties (Altcoins)</option> <option value="224">=> Speculation (Altcoins)</option> <option value="1000000005">Local</option> <option value="241">=> العربية (Arabic)</option> <option value="242">===> العملات البديلة (Altcoins)</option> <option value="265">=====> النقاشات</option> <option value="253">===> إستفسارات و أسئلة المبتدئين</option> <option value="266">===> التعدين</option> <option value="267">===> النقاشات الأخرى</option> <option value="271">===> منصات التبادل</option> <option value="191">=> Bahasa Indonesia (Indonesian)</option> <option value="194">===> Mining (Bahasa Indonesia)</option> <option value="192">===> Altcoins (Bahasa Indonesia)</option> <option value="276">===> Trading dan Spekulasi</option> <option value="277">===> Ekonomi, Politik, dan Budaya</option> <option value="278">===> Topik Lainnya</option> <option value="193">===> Marketplace (Bahasa Indonesia)</option> <option value="30">=> 中文 (Chinese)</option> <option value="117">===> 跳蚤市场</option> <option value="118">===> 山寨币</option> <option value="119">===> 媒体</option> <option value="146">===> 挖矿</option> <option value="196">===> 离题万里</option> <option value="201">=> Hrvatski (Croatian)</option> <option value="220">===> Trgovina</option> <option value="221">===> Altcoins (Hrvatski)</option> <option value="273">=====> Announcements (Hrvatski)</option> <option value="272">===> Off-topic (Hrvatski)</option> <option value="13">=> Français</option> <option value="184">===> Vos sites et projets</option> <option value="50">===> Hors-sujet</option> <option value="183">===> Actualité et News</option> <option value="208">===> Débutants</option> <option value="47">===> Discussions générales et utilisation du Bitcoin</option> <option value="48">===> Mining et Hardware</option> <option value="187">===> Économie et spéculation</option> <option value="49">===> Place de marché</option> <option value="210">=====> Produits et services</option> <option value="211">=====> Petites annonces</option> <option value="209">=====> Échanges</option> <option value="188">===> Le Bitcoin et la loi</option> <option value="54">===> Wiki, documentation et traduction</option> <option value="186">===> Développement et technique</option> <option value="149">===> Altcoins (Français)</option> <option value="258">=====> Annonces</option> <option value="89">=> India</option> <option value="121">===> Mining (India)</option> <option value="122">===> Marketplace (India)</option> <option value="123">===> Regional Languages (India)</option> <option value="124">===> Press & News from India</option> <option value="125">===> Alt Coins (India)</option> <option value="126">===> Buyer/ Seller Reputations (India)</option> <option value="127">===> Off-Topic (India)</option> <option value="28">=> Italiano (Italian)</option> <option value="153">===> Guide (Italiano)</option> <option value="169">===> Progetti</option> <option value="205">===> Discussioni avanzate e sviluppo</option> <option value="175">===> Trading, analisi e speculazione</option> <option value="170">===> Mercato</option> <option value="46">=====> Mercato valute</option> <option value="107">=====> Beni</option> <option value="171">=====> Servizi</option> <option value="172">=====> Esercizi commerciali</option> <option value="173">=====> Hardware/Mining (Italiano)</option> <option value="200">=====> Gambling (Italiano)</option> <option value="162">===> Accuse scam/truffe</option> <option value="115">===> Mining (Italiano)</option> <option value="132">===> Alt-Currencies (Italiano)</option> <option value="176">=====> Annunci</option> <option value="144">===> Raduni/Meeting (Italiano)</option> <option value="165">===> Crittografia e decentralizzazione</option> <option value="145">===> Off-Topic (Italiano)</option> <option value="79">=> Nederlands (Dutch)</option> <option value="80">===> Markt</option> <option value="94">===> Gokken/lotterijen</option> <option value="116">===> Mining (Nederlands)</option> <option value="143">===> Beurzen</option> <option value="147">===> Alt Coins (Nederlands)</option> <option value="148">===> Off-topic (Nederlands)</option> <option value="150">===> Meetings (Nederlands)</option> <option value="82">=> 한국어 (Korean)</option> <option value="182">===> 대체코인 Alt Coins (한국어)</option> <option value="10">=> Русский (Russian)</option> <option value="22">===> Новички</option> <option value="23">===> Бизнес</option> <option value="236">=====> Барахолка</option> <option value="237">=====> Обменники</option> <option value="90">===> Идеи</option> <option value="66">===> Кодеры</option> <option value="21">===> Майнеры</option> <option value="91">===> Политика</option> <option value="20">===> Трейдеры</option> <option value="72">===> Альтернативные криптовалюты</option> <option value="248">=====> Токены</option> <option value="256">=====> Бayнти и aиpдpoпы</option> <option value="55">===> Хайпы</option> <option value="185">===> Работа</option> <option value="18">===> Разное</option> <option value="262">===> Oбcyждeниe Bitcoin</option> <option value="128">=====> Новости</option> <option value="19">=====> Юристы</option> <option value="108">=> Română (Romanian)</option> <option value="109">===> Anunturi importante</option> <option value="114">===> Presa</option> <option value="110">===> Offtopic</option> <option value="111">===> Market</option> <option value="257">=====> Discutii Servicii</option> <option value="166">===> Minerit</option> <option value="112">===> Tutoriale</option> <option value="113">===> Bine ai venit!</option> <option value="259">===> Altcoins (Monede Alternative)</option> <option value="178">=====> Anunturi Monede Alternative</option> <option value="45">=> Skandinavisk</option> <option value="133">=> Türkçe (Turkish)</option> <option value="180">===> Bitcoin Haberleri</option> <option value="189">===> Ekonomi</option> <option value="190">===> Servisler</option> <option value="232">=====> Fonlar</option> <option value="157">===> Alternatif Kripto-Paralar</option> <option value="235">=====> Madencilik (Alternatif Kripto-Paralar)</option> <option value="239">=====> Duyurular (Alternatif Kripto-Paralar)</option> <option value="155">===> Pazar Alanı</option> <option value="156">===> Madencilik</option> <option value="229">===> Proje Geliştirme</option> <option value="158">===> Konu Dışı</option> <option value="174">===> Yeni Başlayanlar & Yardım</option> <option value="230">===> Buluşmalar</option> <option value="29">=> Português (Portuguese)</option> <option value="131">===> Primeiros Passos (Iniciantes)</option> <option value="69">===> Economia & Mercado</option> <option value="181">===> Criptomoedas Alternativas</option> <option value="134">===> Brasil</option> <option value="135">===> Portugal</option> <option value="70">===> Mineração em Geral</option> <option value="206">===> Desenvolvimento & Discussões Técnicas</option> <option value="95">=> עברית (Hebrew)</option> <option value="219">=> Pilipinas</option> <option value="243">===> Altcoins (Pilipinas)</option> <option value="260">=====> Altcoin Announcements (Pilipinas)</option> <option value="268">===> Pamilihan</option> <option value="274">===> Others (Pilipinas)</option> <option value="252">=> 日本語 (Japanese)</option> <option value="255">===> アルトコイン</option> <option value="27">=> Español (Spanish)</option> <option value="31">===> Mercado y Economía</option> <option value="202">=====> Servicios</option> <option value="203">=====> Trading y especulación</option> <option value="32">===> Hardware y Minería</option> <option value="33">===> Esquina Libre</option> <option value="101">===> Mercadillo</option> <option value="102">=====> Mexico</option> <option value="103">=====> Argentina</option> <option value="105">=====> Centroamerica y Caribe</option> <option value="104">=====> España</option> <option value="130">===> Primeros pasos y ayuda</option> <option value="151">===> Altcoins (criptomonedas alternativas)</option> <option value="204">=====> Servicios</option> <option value="177">=====> Minería de altcoins</option> <option value="254">=====> Tokens (Español)</option> <option value="16">=> Deutsch (German)</option> <option value="60">===> Mining (Deutsch)</option> <option value="61">===> Trading und Spekulation</option> <option value="63">===> Projektentwicklung</option> <option value="64">===> Off-Topic (Deutsch)</option> <option value="139">===> Treffen</option> <option value="140">===> Presse </option> <option value="152">===> Altcoins (Deutsch)</option> <option value="270">=====> Announcements (Deutsch)</option> <option value="269">===> Marktplatz</option> <option value="141">=====> Auktionen</option> <option value="36">=====> Suche</option> <option value="35">=====> Biete</option> <option value="62">===> Anfänger und Hilfe</option> <option value="120">=> Ελληνικά (Greek)</option> <option value="136">===> Αγορά</option> <option value="195">===> Mining Discussion (Ελληνικά)</option> <option value="179">===> Altcoins (Ελληνικά)</option> <option value="246">=====> Altcoin Announcements (Ελληνικά)</option> <option value="247">=====> Altcoin Mining (Ελληνικά)</option> <option value="11">=> Other languages/locations</option> <option value="142">=> Polski</option> <option value="163">===> Tablica ogłoszeń</option> <option value="164">===> Alternatywne kryptowaluty</option> <option value="263">=====> Nowe kryptowaluty i tokeny</option> <option value="264">=====> Tablica ogłoszeń (altcoiny)</option> <option value="275">=> Nigeria (Naija)</option> <option value="279">===> Politics and society (Naija)</option> <option value="280">===> Off-topic (Naija)</option> </select> <button type="submit">go</button> </form> </div> </div> </div> </div> </div> </div> <footer class="footer"> <div class="left"> <a class="powered-icon mysql" href="http://www.mysql.com/" target="blank"></a> <a class="powered-icon php" href="http://www.php.net/" target="blank"></a> </div> <div class="center"> © 2020, Bitcointalksearch.org </div> <div class="right"> <a class="valid-icon xhtml" href="http://validator.w3.org/check/referer" target="blank"></a> <a class="valid-icon css" href="http://jigsaw.w3.org/css-validator/check/referer" target="blank"></a> </div> </footer> <script src="/assets/427491ca/f7fa18c7/jquery.js"></script> <script src="/assets/427491ca/0f7cd776/yii.js"></script> <script src="/assets/427491ca/0f7cd776/yii.activeForm.js"></script> <script src="/assets/427491ca/3f84b6fd/jquery-ui.js"></script> <script src="/assets/427491ca/0ec48276/js/akeyboard.min.js"></script> <script src="/assets/427491ca/f1f14823/js/bootstrap.js"></script> <script src="/assets/427491ca/8d094ee3/js/activeform.min.js"></script> <script src="/assets/427491ca/ab575839/js/select2.full.min.js"></script> <script src="/assets/427491ca/7ca46779/js/select2-krajee.min.js"></script> <script src="/assets/427491ca/286d0aed/js/kv-widgets.min.js"></script> <script>jQuery(function ($) { jQuery('#jump-to-form').yiiActiveForm([{"id":"jumptoform-category_id","name":"category_id","container":".field-jumptoform-category_id","input":"#jumptoform-category_id","enableAjaxValidation":true}], {"validationUrl":"\/forum\/default\/jump-to-category"}); $(document).on('change', '#jumptoform-category_id', function() { $('#jump-to-form').submit(); }); $('.messages .items .item').each(function() { var user_data_height = $(this).find('.user-data').outerHeight(); var message_data_height = $(this).find('.message-data').outerHeight(); var header_height = $(this).find('.message-data .header').outerHeight(); var signature_height = $(this).find('.message-data .signature').outerHeight(); var content_padding = parseInt($(this).find('.message-data .content').css('padding-bottom')); if(user_data_height > message_data_height) { $(this).find('.message-data .content').css('height', (user_data_height - (header_height + signature_height)) - content_padding); } }); var $el=jQuery("#w3 .kv-hint-special");if($el.length){$el.each(function(){$(this).activeFieldHint()});} jQuery&&jQuery.pjax&&(jQuery.pjax.defaults.maxCacheLength=0); if (jQuery('#timezoneselectform-timezone').data('select2')) { jQuery('#timezoneselectform-timezone').select2('destroy'); } jQuery.when(jQuery('#timezoneselectform-timezone').select2(select2_7cea2cc0)).done(initS2Loading('timezoneselectform-timezone','s2options_3267a624')); jQuery('#w3').yiiActiveForm([], []); $(document).on('click', '.hider', function () { if ($(this).hasClass('hide-header')) { $('#header .auth-info').addClass('hidden'); $('#header .bottom').addClass('hidden'); $(this).removeClass('hide-header'); $(this).addClass('show-header'); } else { $('#header .auth-info').removeClass('hidden'); $('#header .bottom').removeClass('hidden'); $(this).removeClass('show-header'); $(this).addClass('hide-header'); } }); $('.timezone-dropdown').on('change', function() { var id = $(this).find('select').select2('data')[0].id; $.ajax({ url: '/site/save-timezone', type: 'get', dataType: 'json', data: { timeZoneId: id, }, success: function(response) { location.reload(); }, error: function () { } }); }); function submitBigsearch() { location.href = '/forum/default/search?q=QUERY'.replace('QUERY', encodeURIComponent($('#bigsearch textarea').val())); } $('#bigsearch textarea').on('keydown', function(e) { if (e.key == 'Enter') { event.preventDefault(); submitBigsearch(); } }); var keyboard = new aKeyboard.keyboard({ el: '#akeyboard-container' }); keyboard.inputOn('#bigsearch textarea', 'value'); keyboard.onclick('Enter', function() { $('#akeyboard-container').hide(); submitBigsearch(); }); $('#akeyboard-container').draggable(); $('.bigsearch-function-tia').on('click', function() { $('#akeyboard-container').toggle(); }); });</script></body> </html>