hd49728 (OP)
Legendary
Offline
Activity: 2198
Merit: 1049
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 24, 2019, 10:51:02 AM |
|
Added newest extension. Topic | Date | written by | Section | Merit | | _____________________________________________________________________ | __________ | _____________ | ______________________________ | ____ | [BETA] Bitcointalk Extension - All In One | 23/8/2019 | mrvuit | Multiple features | 7+ |
|
|
|
|
hatshepsut93
Legendary
Offline
Activity: 3038
Merit: 2155
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 25, 2019, 04:41:15 PM Last edit: August 25, 2019, 04:58:58 PM by hatshepsut93 Merited by LoyceV (10), xandry (2), Welsh (2), Xal0lex (2), bones261 (2), ABCbits (1), hd49728 (1), mrvuit (1) |
|
I don't know if it was done before, couldn't find anything like that, so I made a tiny script that sums all mertis of a post and displays it before individual merits Like this: ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FuKHHbTp.png&t=665&c=QfVeC5XfCyPJYA) // ==UserScript== // @name Bitcointalk Post Merit Sum // @version 1.0 // @grant none // @include https://bitcointalk.org/index.php?topic=* // @run-at document-end // ==/UserScript==
;[...document.querySelectorAll(".td_headerandpost")].forEach(post => { try { let sum = [...post.querySelectorAll(".smalltext i > a")] .map(e => { return parseInt(e.nextSibling.textContent.match(/\((.*)\)/)[1]) }) .reduce((acc, e) => acc + e, 0) if (sum > 0) { let sumElement = document.createElement("span") sumElement.textContent = `Total merit: ${sum} | ` post.querySelector(".smalltext i").prepend(sumElement) } } catch (e) { console.error(e) } })
|
|
|
|
hatshepsut93
Legendary
Offline
Activity: 3038
Merit: 2155
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 25, 2019, 04:55:21 PM |
|
If such things isn't available on the list, then most likely it's not. It's good to see you built without external library.
On a side note, i think ";" at the beginning of code (after usercript) isn't needed.
I don't know JQuery and don't use it, because I've started learning JS around 1.5 years ago, and at that point standard library was so good that you don't need any libraries for basic DOM manipulation. The ";" was inserted by my linter, it's still valid Javascript, so I didn't bother to remove it. It can help if someone will copypaste this code into a bigger userscript, for example.
|
|
|
|
hd49728 (OP)
Legendary
Offline
Activity: 2198
Merit: 1049
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 26, 2019, 01:18:43 AM Last edit: August 26, 2019, 02:25:30 AM by hd49728 |
|
I don't know if it was done before, couldn't find anything like that, so I made a tiny script that sums all mertis of a post and displays it before individual merits Like this: ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FuKHHbTp.png&t=665&c=QfVeC5XfCyPJYA) [ ... ] Thank you. Your userscript is useful, sure. I think other users will like it, of course if they are fan of userscripts, too. Like this thread, I do have to count total received merits of threads by myself, manually. With this script, people can naturally get it. How about that one? @small improvement request. In merited posts, show your name in red or bold or..You can read some ideas in that thread: Glow, Highlight, dropdown list. It will be great if you can make an userscript for that demand. You made it!theymos answered there: Pretty sure it's first by merit awarded for that post (obviously), then by activity. Right. And in case of equal activity, member ID is the tiebreaker.
Added newest userscript.
|
|
|
|
mrvuit
Copper Member
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 81
Merit: 85
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 26, 2019, 02:23:28 AM |
|
I don't know if it was done before, couldn't find anything like that, so I made a tiny script that sums all mertis of a post and displays it before individual merits Like this: ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FuKHHbTp.png&t=665&c=QfVeC5XfCyPJYA) // ==UserScript== // @name Bitcointalk Post Merit Sum // @version 1.0 // @grant none // @include https://bitcointalk.org/index.php?topic=* // @run-at document-end // ==/UserScript==
;[...document.querySelectorAll(".td_headerandpost")].forEach(post => { try { let sum = [...post.querySelectorAll(".smalltext i > a")] .map(e => { return parseInt(e.nextSibling.textContent.match(/\((.*)\)/)[1]) }) .reduce((acc, e) => acc + e, 0) if (sum > 0) { let sumElement = document.createElement("span") sumElement.textContent = `Total merit: ${sum} | ` post.querySelector(".smalltext i").prepend(sumElement) } } catch (e) { console.error(e) } })
![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FhVOXBds.png&t=665&c=8QVYsgnzc1v8cQ) I added it to my extension, are you willing? It will be updated in the next version. https://bitcointalk.org/index.php?topic=5178297.msg52245025#msg52245025
|
|
|
|
hatshepsut93
Legendary
Offline
Activity: 3038
Merit: 2155
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 26, 2019, 02:35:47 AM |
|
Yeah sure. All scripts that I write are free and open source, use and include them how you wish.
|
|
|
|
hd49728 (OP)
Legendary
Offline
Activity: 2198
Merit: 1049
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 30, 2019, 07:35:22 AM Last edit: October 04, 2019, 06:58:39 AM by hd49728 |
|
There is a request on userscript to get fully detailed information for quotes in blocked topics, includes author name, topic number, post number, date and time of each post, and hyperlinks of attached images. If someone has skills and spare time to do this, please help. I think this script is useful and will be widely used by users. I made my request weeks ago, there: https://bitcointalk.org/index.php?topic=5178297.msg52342695#msg52342695
|
|
|
|
hd49728 (OP)
Legendary
Offline
Activity: 2198
Merit: 1049
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 01, 2019, 02:31:21 PM |
|
If you can, please code and make an userscript that displays total figures for: - Sent in the last 120 days
- Received in the last 120 days
Currently, on the merit stat page of each user, there are no total figures for those statistics and I think managers and applicants of campaigns will like that userscript. ![Cheesy](https://bitcointalk.org/Smileys/default/cheesy.gif)
|
|
|
|
TryNinja
Legendary
Offline
Activity: 2940
Merit: 7370
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 01, 2019, 02:42:27 PM Last edit: November 22, 2019, 01:59:15 AM by TryNinja Merited by babo (2), Halab (2), hd49728 (2) |
|
If you can, please code and make an userscript that displays total figures for: - Sent in the last 120 days
- Received in the last 120 days
Currently, on the merit stat page of each user, there are no total figures for those statistics and I think managers and applicants of campaigns will like that userscript. ![Cheesy](https://bitcointalk.org/Smileys/default/cheesy.gif) Is that what you were thinking about? EDIT: Fixed version here https://bitcointalk.org/index.php?topic=5148488.msg53143412#msg53143412// ==UserScript== // @name Total Merit Sent & Received on Merit page // @version 0.1 // @author TryNinja // @match https://bitcointalk.org/index.php?*action=merit;* // @grant none // ==/UserScript==
// OUTDATED VERSION, CHECK THE LINK ABOVE FOR THE LATEST CODE
(function() { 'use strict';
const sent = document.querySelectorAll("#bodyarea > ul:nth-child(5) > li").length; const received = document.querySelectorAll("#bodyarea > ul:nth-child(7) > li").length;
const sentH3 = document.querySelector("#bodyarea > h3:nth-child(4)"); const receivedH3 = document.querySelector("#bodyarea > h3:nth-child(6)");
var sentNode = document.createTextNode(" (total: " + sent + ")"); var receivedNode = document.createTextNode(" (total: " + received + ")"); sentH3.appendChild(sentNode); receivedH3.appendChild(receivedNode); })(); On my merit page: Sent in the last 120 days (total: 75) [...]
Received in the last 120 days (total: 143) [...]
|
|
|
|
hd49728 (OP)
Legendary
Offline
Activity: 2198
Merit: 1049
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 01, 2019, 02:47:09 PM |
|
On my merit page: Sent in the last 120 days (total: 75) [...]
Received in the last 120 days (total: 143) [...]
That is what I ask for. OP updated and it is so nice to announce the userscript (for managers, and applicants of campaigns). Thank you so much for your fastly built userscript.
|
|
|
|
hatshepsut93
Legendary
Offline
Activity: 3038
Merit: 2155
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 14, 2019, 09:52:22 AM |
|
I created a github repo for all my userscripts - https://github.com/Tiramisu77/bct-userscripts Feel free to open and issue or make a pull request if you have to ideas. Additionally, I've fixed a bug that made my scripts run unnecessarily on history change - if anyone knows how do to this by configuring the script rather than programmatically, I'd be glad to hear that. I also published 2 new scripts - highlightThread that allows you to highlight threads that contain keywords that you are interested in, and collapseGiantQuotes that collapses quotes that take too much space (usually happens when posters make deeply nested quotes or quote large images).
|
|
|
|
TheBeardedBaby
Legendary
Offline
Activity: 2240
Merit: 3150
₿uy / $ell ..oeleo ;(
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 14, 2019, 10:27:43 AM |
|
I didn't see Sort posts by merit script in the list so there you go. Thanks to hatshepsut93 for the great work ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) Here you go, it adds a "sort by merit" button right before the "reply" button. Works well even on large threads, tried it with all posts from the anniversary art thread. // ==UserScript== // @name Bitcointalk Sort By Merit // @version 1.0 // @grant none // @include https://bitcointalk.org/index.php?topic=* // @run-at document-end // ==/UserScript==
const sortBtn = document.createElement("a") sortBtn.href = "javascript:void(0)" sortBtn.textContent = "sort by merit"
const threadButtons = document.querySelector("td.mirrortab_back")
threadButtons.prepend(document.createTextNode(" | ")) threadButtons.prepend(sortBtn)
sortBtn.addEventListener("click", sortByMerit)
function sortByMerit() { const table = document.querySelector("#bodyarea .bordercolor > tbody") const posts = [...table.rows] .map(post => { try { const merit = [...post.querySelectorAll(".td_headerandpost .smalltext i > a")] .map(e => { return parseInt(e.nextSibling.textContent.match(/\((.*)\)/)[1]) }) .reduce((acc, e) => acc + e, 0)
return { merit, post } } catch (e) { console.error(e) } }) .sort(({ merit: merit1 }, { merit: merit2 }) => merit2 - merit1)
posts.forEach(({ post, merit }) => { try { table.append(post) } catch (e) {} }) }
|
|
|
|
hd49728 (OP)
Legendary
Offline
Activity: 2198
Merit: 1049
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 14, 2019, 12:21:51 PM Last edit: November 15, 2019, 03:40:10 AM by hd49728 |
|
The GitHub repo is a very nice initiative, and your two new scripts are great too. I will update OP with your new products later today. It is hard to update with table format on phones. Sorry for the temporary inconvenience and a bit delayed update. Done.
|
|
|
|
TheBeardedBaby
Legendary
Offline
Activity: 2240
Merit: 3150
₿uy / $ell ..oeleo ;(
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 20, 2019, 09:56:15 AM |
|
Is there a script showing which user is banned, I couldn't find anything yet about it? LoyceV has the list of banned users publicly available so I guess it won't be that difficult to write a script and check for the UID in the list or maybe find another, easier approach? We are waiting for such script for quite a while now. It was promised that it will be included in the BPIP add-on but...
|
|
|
|
hd49728 (OP)
Legendary
Offline
Activity: 2198
Merit: 1049
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 20, 2019, 09:59:41 AM Last edit: November 21, 2019, 03:01:01 AM by hd49728 |
|
I will add the script to show dt. It was made by DarkStar_. This script is not a newly released one but I did not know it till yesterday and no one let me know about it too. Done.
|
|
|
|
TryNinja
Legendary
Offline
Activity: 2940
Merit: 7370
|
I just noticed I made a very bad and obvious mistake on my "Merits received/sent in the last 120 days" script. I counted each entry as if it was of only 1 merit, making the number appear much lower than it should. I only noticed that when I checked the profile of a user that received 50 merits in a single transaction (along with other txs), and yet it was showing like he only received 49 merits in the last 120 days. Sorry about that. ![Tongue](https://bitcointalk.org/Smileys/default/tongue.gif) Here is the fixed version, which considers how much you sent/received in each tx: // ==UserScript== // @name Total Merit Sent & Received on Merit page // @version 0.2 // @author TryNinja // @match https://bitcointalk.org/index.php?*action=merit;* // @grant none // ==/UserScript== (function() { 'use strict';
const sent = document.querySelectorAll("#bodyarea > ul:nth-child(5) > li"); const received = document.querySelectorAll("#bodyarea > ul:nth-child(7) > li");
var totalReceived = 0; var totalSent = 0;
received.forEach(receivedTx => { const txValue = receivedTx.innerHTML.replace(/^(.*?\: )( for.*)|( from.*)/, "").replace(/(.*: )/, ""); totalReceived += parseInt(txValue); })
sent.forEach(sentTx => { const txValue = sentTx.innerHTML.replace(/^(.*?\: )( for.*)|( to.*)/, "").replace(/(.*: )/, ""); totalSent += parseInt(txValue); })
const sentH3 = document.querySelector("#bodyarea > h3:nth-child(4)"); const receivedH3 = document.querySelector("#bodyarea > h3:nth-child(6)");
var sentNode = document.createTextNode(" (total: " + totalSent + ")"); var receivedNode = document.createTextNode(" (total: " + totalReceived + ")"); sentH3.appendChild(sentNode); receivedH3.appendChild(receivedNode); })();
My received in the last 120 days went from 156 to 264.
|
|
|
|
hd49728 (OP)
Legendary
Offline
Activity: 2198
Merit: 1049
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 22, 2019, 01:55:19 AM |
|
Here is the fixed version, which considers how much you sent/received in each tx:
Thank you for fixing it and announcing about it in this thread and via PM. I updated OP with link to the version 0.2 of your script, too.
|
|
|
|
hd49728 (OP)
Legendary
Offline
Activity: 2198
Merit: 1049
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 28, 2019, 03:32:13 AM |
|
There is a request on userscript to get fully detailed information for quotes in blocked topics, includes author name, topic number, post number, date and time of each post, and hyperlinks of attached images. If someone has skills and spare time to do this, please help. I think this script is useful and will be widely used by users. I made my request weeks ago, there: https://bitcointalk.org/index.php?topic=5178297.msg52342695#msg52342695Last week, @1miau raised the demand for a new feature Enabling quotes in locked topics, which is nearly as same as what I raised a long time ago. In that topic, people commented and gave some potential technical steps to build up a script. Steps to quote posts in locked topicsSteps to get imgur links in locked topicsI hope that someone will build up that script.
|
|
|
|
SFR10
Legendary
Offline
Activity: 3108
Merit: 3499
Crypto Swap Exchange
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 28, 2019, 09:08:27 AM |
|
Found a few more: - Take note: I'm not vouching for the following to be safe.
|
|
|
|
hd49728 (OP)
Legendary
Offline
Activity: 2198
Merit: 1049
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 10, 2019, 02:06:00 AM |
|
Found a few more: - Take note: I'm not vouching for the following to be safe.
Thank you for giving me those ones. As the reminder in OP, people have to take care of their security by using scripts, addons, bots listed in this thread. Everyone have intention to use any of those userscripts/ extensions should accept risks themselves. Even those ones listed here published by well-known users, it does not guarentee that you have zero risk when using them.
|
|
|
|
|