Pages:
Author

Topic: "Show All" on long topics - page 2. (Read 2369 times)

legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
August 17, 2019, 04:08:44 AM
#38
I wanted to move this to my VPS, but I've postponed that (it was unreliable). I did continue my quest for less manual work, so this runs from a cronjob now.

Testing: http://loyce.club/showall/5112444.html

Let me know if anything fails!
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
June 10, 2019, 05:24:48 AM
#37
Signatures seem to be disabled/not displayed. Is there a way to have signatures displayed? The lack of a signature is a quick indicator that someone might be banned without cross referencing their handle/UID with any kind of list.
I only copy the posts, which was easiest and gives a cleaner page. I could strike out the usernames for banned users, but considering "showall" is only used a few times per month, I'd rather spend my time on other things (such as my long delayed dtview-viewer).
legendary
Activity: 2758
Merit: 6830
June 09, 2019, 06:53:34 PM
#36
I tried installing the script in Tampermonkey. Here's the result:

https://talkimg.com/images/2023/05/14/blob24b9c668cfed8bfd.png
It worked for me. Try this:

Code:
// ==UserScript==
// @name         @name LoyceV ShowAll Chrome Extension
// @include      https://bitcointalk.org/*
// @author       @author Initscri (https://bitcointalk.org/index.php?action=profile;u=186520)
// ==/UserScript==

function getQueryParams(qs) {
    qs = qs.split('+').join(' ');

    var params = {},
        tokens,
        re = /[?&]?([^=]+)=([^&]*)/g;

    while (tokens = re.exec(qs)) {
        params[decodeURIComponent(tokens[1])] = decodeURIComponent(tokens[2]);
    }

    return params;
}

var LoyceVShowAllChromeExtension = {
  logPrefix: 'LoyceV Show All Chrome Extension V1.0',
  verbose: true, // I mean, you should probably leave this on.
  logIfVerbose: function(message) {
    var controller = this;

    if(controller.verbose == true) {
      console.log(controller.logPrefix + ': ' + message);
    }
  },
  checkIfOnTopicPage: function() {
    var controller = this;

    // Get the mirrortab_back container.
    var mirrortab_b = document.getElementsByClassName("mirrortab_back")[0];
    var url_identifier = '//bitcointalk.org/index.php?topic='; // This also ensures this only runs on BitcoinTalk, and not similar SMF forums which share the same URL structure.
    var cur_url = window.location.href;

    // Check if mirrortab is avail, and on topic page.
    if(mirrortab_b != null && cur_url.indexOf(url_identifier) !== -1) {
      // on a BitcoinTalk.org topic page, proceed.
      console.log('Adding Show All Link');
      controller.addShowAllLinkForTopic(mirrortab_b);
    }
  },
  addShowAllLinkForTopic(location) {
    var controller = this;

    // First, get the topic ID from the url.
    var queryParams = getQueryParams(document.location.href);
    var topicId = queryParams['https://bitcointalk.org/index.php?topic'];
    topicId = topicId.substring(0, topicId.indexOf('.'));
    topicId = topicId.replace('.', '');

    if(location != null && topicId != null) {
      // Adding!
      var nodeSeperator = document.createElement('span');
      nodeSeperator.innerHTML = '  |  ';

      // Create the link
      var nodeLink = document.createElement('a');
      nodeLink.setAttribute('href', 'http://loyce.club/showall/' + topicId + '.html');
      nodeLink.setAttribute('target', '_BLANK');

      // Set the icon of the link.
      nodeLink.innerHTML = 'Show All';

      // And set the link!
      controller.logIfVerbose('Setting the link!');
      location.appendChild(nodeSeperator);
      location.appendChild(nodeLink);

      controller.logIfVerbose('All Done!');
    }
  },
  init: function() {
    var controller = this;

    // Check if on topic page.
    // And this runs everything else.
    controller.checkIfOnTopicPage();
  }
}

setTimeout(function() {
LoyceVShowAllChromeExtension.init();
}, 500);

It adds this option (I had to look for it):



sorry for the off-topic
copper member
Activity: 2870
Merit: 2298
June 09, 2019, 06:31:46 PM
#35
http://loyce.club/showall/5110093.html

Thanks

Signatures seem to be disabled/not displayed. Is there a way to have signatures displayed? The lack of a signature is a quick indicator that someone might be banned without cross referencing their handle/UID with any kind of list.
hero member
Activity: 1540
Merit: 759
May 30, 2019, 11:49:12 PM
#34
I know you said the links have to be posted on BitcoinTalk in order to be picked up, so they can just copy the link if it 404s I guess? It just gets the user to the URL structure you recommended in the opening post.
I only scrape long topics after it has been requested, so there's not much use for showing links without posting them.

I can't help thinking manually editing the URL and posting it is much easier than installing a browser extension for this.

I was under the impression it worked for every URL generated, not when pasted into a post.

Either way though, it's there if people wish to use it. It makes it faster to copy/paste because you can just "Copy Link Address", and quicker to see if it's already been loaded into your script.

It didn't take me long to create since I had similar scripts available based on threads / urls.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
May 30, 2019, 03:36:45 AM
#33
I know you said the links have to be posted on BitcoinTalk in order to be picked up, so they can just copy the link if it 404s I guess? It just gets the user to the URL structure you recommended in the opening post.
I only scrape long topics after it has been requested, so there's not much use for showing links without posting them.

I can't help thinking manually editing the URL and posting it is much easier than installing a browser extension for this.
hero member
Activity: 1540
Merit: 759
May 29, 2019, 12:41:53 PM
#32
So, I was bored & wanted to code something else than the projects I was working on for an hour. I made a script to make this a whole lot easier to use (I hope that's ok LoyceV, if not LMK):

I tried installing the script in Tampermonkey. Here's the result:



Hmm, weird, I'll test and touch base once I figure out why.
staff
Activity: 2436
Merit: 2347
May 29, 2019, 12:40:56 PM
#31
So, I was bored & wanted to code something else than the projects I was working on for an hour. I made a script to make this a whole lot easier to use (I hope that's ok LoyceV, if not LMK):

I tried installing the script in Tampermonkey. Here's the result:

hero member
Activity: 1540
Merit: 759
May 29, 2019, 12:02:35 PM
#30
I made a script to make this a whole lot easier to use
I'm very careful with browser extensions and barely ever install them, but if someone is brave enough, they can try it out.
I'm curious though if you've tested it yourself, I didn't see any newly added topics on http://loyce.club/showall/?MA.

Source code is fully available. I did, seems to 404 when clicking on a thread which hasn't been archived. IDK if that's normal or not.

I know you said the links have to be posted on BitcoinTalk in order to be picked up, so they can just copy the link if it 404s I guess? It just gets the user to the URL structure you recommended in the opening post.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
May 29, 2019, 04:34:34 AM
#29
I made a script to make this a whole lot easier to use
I'm very careful with browser extensions and barely ever install them, but if someone is brave enough, they can try it out.
I'm curious though if you've tested it yourself, I didn't see any newly added topics on http://loyce.club/showall/?MA.
hero member
Activity: 1540
Merit: 759
May 29, 2019, 01:27:52 AM
#28
So, I was bored & wanted to code something else than the projects I was working on for an hour. I made a script to make this a whole lot easier to use (I hope that's ok LoyceV, if not LMK):

https://github.com/Initscri/LoyceV-ShowAll-ChromeExtension/

It's a chrome extension, but can be used for Firefox as well, or you can simply just pull the script from content-script.js and use in GreaseMonkey or something.

For those who don't know how to load Unpacked Extensions, visit this link here: https://stackoverflow.com/questions/24577024/install-chrome-extension-not-in-the-store
legendary
Activity: 2366
Merit: 1512
#1 VIP Crypto Casino
May 28, 2019, 05:38:26 PM
#27
uhm if I'm not wrong I was on the browser history with an old link and I've overwritten the new topic ID and pressed ENTER but I'm not sure about it.
You'll have to post the link somewhere in a new post on Bitcointalk, in order for my scraper to catch it. So when you mentioned it here, it activated.

ok, got it. Thanks
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
May 28, 2019, 05:36:44 PM
#26
uhm if I'm not wrong I was on the browser history with an old link and I've overwritten the new topic ID and pressed ENTER but I'm not sure about it.
You'll have to post the link somewhere in a new post on Bitcointalk, in order for my scraper to catch it. So when you mentioned it here, it activated.
legendary
Activity: 2366
Merit: 1512
#1 VIP Crypto Casino
May 28, 2019, 05:29:41 PM
#25
I waited around 2 hours but it cannot be loaded.
My scraper didn't catch your first try (where did you post it?), but it's currently scraping based on the post I now quoted.

Update: done!

uhm if I'm not wrong I was on the browser history with an old link and I've overwritten the new topic ID and pressed ENTER but I'm not sure about it.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
May 28, 2019, 05:23:51 PM
#24
I waited around 2 hours but it cannot be loaded.
My scraper didn't catch your first try (where did you post it?), but it's currently scraping based on the post I now quoted.

Update: done!
legendary
Activity: 2366
Merit: 1512
#1 VIP Crypto Casino
May 28, 2019, 05:20:51 PM
#23
Hey mate I've tried with http://loyce.club/showall/873587.html

I waited around 2 hours but it cannot be loaded.
legendary
Activity: 2366
Merit: 1512
#1 VIP Crypto Casino
May 07, 2019, 05:34:08 PM
#22
Yeah I saw that It took more than expected, also I removed my last post on this thread when I've noticed that the website has done the upload.

Thread archived here: http://archive.fo/1ecbv  Wink

hero member
Activity: 1643
Merit: 683
LoyceV on the road. Or couch.
May 07, 2019, 05:27:31 PM
#21
It works fine, but needs some time to scrape all pages.
You can post this in any thread, is doesn't have to be in this topic.
legendary
Activity: 2366
Merit: 1512
#1 VIP Crypto Casino
April 04, 2019, 08:53:22 AM
#20
Maybe, I loaded the page on your website and got the instant error and I left the site I wasn't thinking about the loading the data since I haven't got the message about it.
hero member
Activity: 1643
Merit: 683
LoyceV on the road. Or couch.
April 03, 2019, 05:43:59 PM
#19
Your link works fine, I think you were too fast.
Pages:
Jump to: