Author

Topic: popup userscripts suggestion (Read 714 times)

sr. member
Activity: 338
Merit: 337
March 02, 2024, 01:48:04 PM
#40
If you have any idea what I can do to fix this, I'll try Smiley
I think no one uses this script now, so there is no need to do anything
anyway, we understand the cause of the problem..


However it would be great to solve this problem..
I don't know anything about AWS server, any help to solve this problem is welcome

another edit!: I found my own way to make the script work by adding another plugin
sr. member
Activity: 448
Merit: 560
Crypto Casino and Sportsbook
March 02, 2024, 10:28:34 AM
#39
Nice suggestion Op Opening using a pop up function would be nice but unfortunately I don't think it is really necessary. Secondly I noticed theymos hardly takes suggestion for upgrades like these frequently . He hardly even accepts edits or additional functions to the forum.
Anyways functions like these can come with a few bugs and even slow loading for users with poor or unstable internet connection.

Sincerely the idea is a nice but I believe it would be better as it is. If you don't wish a opening a new page, you can alternatively right-click and open profile via a new tab. Plus if you make use of BPIP extension you get extra details about the user's profile without clicking.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
March 02, 2024, 09:34:00 AM
#38
I saw this doesn't work anymore, and didn't want to post on the local board. My (donated) AWS server is now using Cloudfront (since a DDoS-attack a while ago), so I guess that could the reason. If you have any idea what I can do to fix this, I'll try Smiley
sr. member
Activity: 338
Merit: 337
September 18, 2020, 11:57:05 AM
#37
There is no new just last change for "Original unedited post (loyce backup)" before close my account ...
https://pastebin.com/AP2XK975

Note: this only works with Tampermonkey‬
I will Lock this topic also, thank you all
sr. member
Activity: 840
Merit: 375
September 11, 2020, 07:11:33 AM
#36
Attempt to add "Find the difference between edited and unedited post" feature
Any Dev help to add this feature are welcome Smiley ( I haven't done it yet )

I actually thought of the same idea just recently! I will try to implement it in the next version release of my user script.



Image tags seem to change within the HTML code over time, so unedited posts with images might be marked as edited. I'm not sure yet how to tackle this.

Hm, maybe comparing only the inner-html of elements instead of comparing the whole html may solve this?

Edit: Nevermind, just checked how bitcointalk serves images via "https://ip.bitcointalk.org/" and you are right, the image token changes overtime... Maybe ignore image tags when comparing in this case?

legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
September 11, 2020, 06:56:59 AM
#35
Attempt to add "Find the difference between edited and unedited post" feature
For my topic details, I just use diff to see if anything changed.
One of the problems was that "Today" in archived quotes turns into the date after a day. And img-tags often give "false positives":
Image tags seem to change within the HTML code over time, so unedited posts with images might be marked as edited. I'm not sure yet how to tackle this.

This would be a very cool feature! While testing my "topic details", I noticed many people (including myself) do ninja edits, such as removing a space or adding a dot. It would be nice to ignore those, but as always lack of time gets me.

I guess you will get trouble because you are relying on loyceclub's database (it does not scrap data on editing time, not sure)
Correct. That would require re-scraping all posts. TryNinja is giving it a shot.
legendary
Activity: 2310
Merit: 4085
Farewell o_e_l_e_o
September 10, 2020, 08:25:33 PM
#34
hi tranthidung, I didn't quite understand your point
Did you mean the " Last edit like this " or you mean that edited post before 10,15 min ?

if you mean 'Last edit' i think there is no need to add it ( because it appears when we hover over the date )
I meant for reserved posts (to edit and add contents later) from post-quota hunters, you can detect it with such a new script.

In some campaigns, managers require posts have to be spread in at least 5 days AND / OR no more than 3 or 4 posts per day will be counted for payments. It is what some do, make 'reserved posts' to get enough 4 posts per day or to meet a deadline postcount. Then, they come back later to edit contents, convert reserved posts to contentful posts.

You can read the thread I gave in which people already discussed about that style.
sr. member
Activity: 338
Merit: 337
September 10, 2020, 01:17:52 PM
#33
Counter for the period between initial post and first (or even include the last) editing time.
hi tranthidung, I didn't quite understand your point
Did you mean the " Last edit like this " or you mean that edited post before 10,15 min ?

if you mean 'Last edit' i think there is no need to add it ( because it appears when we hover over the date )
legendary
Activity: 2310
Merit: 4085
Farewell o_e_l_e_o
September 10, 2020, 10:24:34 AM
#32
Attempt to add "Find the difference between edited and unedited post" feature
Any Dev help to add this feature are welcome Smiley ( I haven't done it yet )
Interesting. I don't use it but I know a potential additional feature for your script.

Counter for the period between initial post and first (or even include the last) editing time.
Last year (maybe), there is a discussion thread on a hidden tricky method of spammers to get their post quota.

They simply make initial post like that "Reserve" to reserve enough posts for post quota to get payment each week. Then, they come back later to add contents.

I guess you will get trouble because you are relying on loyceclub's database (it does not scrap data on editing time, not sure)

I am going to search and give you link of that discussion thread later.  Cheesy


Found it: Posting reserve?
sr. member
Activity: 338
Merit: 337
September 10, 2020, 10:13:32 AM
#31
Attempt to add "Find the difference between edited and unedited post" feature
Any Dev help to add this feature are welcome Smiley ( I haven't done it yet )


sr. member
Activity: 338
Merit: 337
August 25, 2020, 12:43:00 PM
#30
there another small update here: https://pastebin.com/dmjiqUsE (One of them include ".post" instead of "body" content)

  • Have you noticed other problems?
  • Did you encounter problems with speed? like me (Maybe because my connection is slow)
  • Any suggestion to change the code? (to be faster and better) Because as you know, my knowledge of javascript is modest.

sr. member
Activity: 840
Merit: 375
August 23, 2020, 03:45:56 PM
#29
Personally I prefer to open things like that up in a separate tab rather than have a scroll-over pop-up.  Right now, Amazon Prime Video has gone way overboard with features like this, and it's to a point where you really have to watch where your cursor wanders when you've got your hand on the mouse--it's extremely annoying.
I actually thought of this and agree with you to a certain degree. That's why I'm right now implementing the ability to disable the features by toggling switches. All the user have to do to surf freely without worrying about accidentally hovering an username and have a popup opened is to toggle the switch Smiley

Looks like this for the moment:

legendary
Activity: 3500
Merit: 6981
Top Crypto Casino
August 23, 2020, 03:21:01 PM
#28
I prefer a pop up when viewing someone's profile than being redirected to another page.
Personally I prefer to open things like that up in a separate tab rather than have a scroll-over pop-up.  Right now, Amazon Prime Video has gone way overboard with features like this, and it's to a point where you really have to watch where your cursor wanders when you've got your hand on the mouse--it's extremely annoying.

I don't think OP's idea is bad at all, but I don't think it's necessary or something that I'd find useful myself.  And I can pretty much guarantee that this will find itself in the graveyard of suggested features that got ignored by TheymosTM.

Edit:
Didn't read the entire thread before posting the above, and it looks like the talented coders took OP's idea and ran with it, which is great to see because of the aforementioned graveyard.  Props to those who helped him out.
sr. member
Activity: 840
Merit: 375
August 23, 2020, 01:02:22 PM
#27
The code has been updated here https://pastebin.com/xPeyYLLj
there is a very simple problem with (unedited loyce backup) link on top popup box

also, there is an unresolved problem appears when clicking on a old post (the posts that don't have unedited backup)
the code needs to be rewritten, organized, and shortened

It's not a problem your script works correctly, this error showing up doesn't affect the behavior , you are already handling the Error 404 with this code snippet
Quote
if (this.readyState == 4 && this.status == 404)
                modalBody.innerHTML = "Sorry, there no unedited backup for this post.";

But you can't prevent the error from showing up on the console AFAIK.
sr. member
Activity: 338
Merit: 337
August 23, 2020, 02:59:48 AM
#26
The code has been updated here https://pastebin.com/xPeyYLLj
there is a very simple problem with (unedited loyce backup) link on top popup box

also, there is an unresolved problem appears when clicking on a old post (the posts that don't have unedited backup)
the code needs to be rewritten, organized, and shortened
legendary
Activity: 2758
Merit: 6830
August 22, 2020, 07:57:06 PM
#25
When do you get that error? I tried your script and I never get it
When trying to post the script code in the forum. Like I said, Cloudflare blocks inputs that appear suspicious (like HTML codes that inject JS).

https://support.cloudflare.com/hc/en-us/articles/200172016-Understanding-the-Cloudflare-Web-Application-Firewall-WAF-
sr. member
Activity: 840
Merit: 375
August 22, 2020, 07:53:29 PM
#24
~
When do you get that error? I tried your script and I never get it
legendary
Activity: 2758
Merit: 6830
August 22, 2020, 06:37:43 PM
#23
Maybe some characters in code are prohibited Thus this error appears
Post it on pastebin and link it here so I can take a look. You are loading HTML stuff through JS which is commonly used for XSS attacks, so Cloudflare dislikes it.
sr. member
Activity: 338
Merit: 337
August 22, 2020, 06:33:59 PM
#22
This function returns an object that has methods to actually request html from other websites (see this for details)
OK thanks Aveatrex  great information I will try to learn more in the future

The extension is pretty much finished, it has 2 features: Opening the user profile within a popup when you hover his username and open the unedited post within a popup when you click on the date. ...
I can not wait to experience  Cheesy Good luck..

At the same time I tried to complete my own superscript popup unedited post (Thanks to Google Grin)
I learned a lot during this trip

https://i.ibb.co/mc3sykY/uneditedpost.gif

But I faced the problem when inserting code here this msg Show me https://i.ibb.co/0ZLC5hN/image.png
Maybe some characters in code are prohibited Thus this error appears


( It needs more improvement and bug fixes, but it works )
code: https://pastebin.com/xPeyYLLj (thanks to TryNinja)
sr. member
Activity: 840
Merit: 375
August 22, 2020, 05:53:18 PM
#21
I don't know how to get the loyce data

You can use fetch() like you said or you can make an XMLHttp request. Here's the XMLhttp request function (in javascript) that I use which you can find detailed on stackoverflow:

Quote from: stackoverflow
function request() {
    try {
       return new XMLHttpRequest();
    }
    catch (error) {}
    try {
       return new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch (error) {}
    try {
       return new ActiveXObject("Microsoft.XMLHTTP");}
    catch (error) {}
  
    throw new Error("Couldn't make the request.");
  }

This function returns an object that has methods to actually request html from other websites (see this for details)



The extension is pretty much finished, it has 2 features: Opening the user profile within a popup when you hover his username and open the unedited post within a popup when you click on the date. Now gotta go through the hassle of getting approved in Chrome Web Store. If you have other ideas/suggestions let me know so I can try adding them.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
August 22, 2020, 02:23:30 AM
#20
sr. member
Activity: 338
Merit: 337
August 21, 2020, 09:27:27 PM
#19
pop up post edited history when click on edited date

I stopped here, I don't know how to get the loyce data this is just a try
hope someone could complete the idea.. if you find an error please correct it


Code:
// ==UserScript==
// @name         Edit History
// @namespace    https://bitcointalk.org/
// @version      0.1
// @description  bitcointalk edit history pop up
// @author       0x256
// @include      https://bitcointalk.org/index.php?topic=*
// @grant        GM_addStyle

// ==/UserScript==

(function() {
    'use strict';
    /* edit_history_min style (css) */
    GM_addStyle(".modal{background-color:#fff;z-index:10;position:fixed;top:20%;left:16.5%;width:70vw;border-radius:5px}.modal-header{position:relative}.modal-header,.modal-body{padding:10px}.modal-header > h3{margin:0}.modal-close{cursor:pointer;padding:10px 20px;display:inline-block;position:absolute;top:0;right:0;opacity:0.8}.modal-close:hover{opacity:1}.modal-body{background:#ECEDF3}.modal-backdrop{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#000;opacity:.3}");


// Get the button that opens the modal
let myBtn = document.querySelectorAll(".edited");

Array.from(myBtn).forEach((element) => {
    element.addEventListener('click', creatModal );
    console.log(element);
});

/** open the modal */
// When the user clicks the date, create and open the modal
function creatModal() {

    /* create modal after myBtn */
    this.insertAdjacentHTML('afterend', `
    
    `);

    // Get the modal
    let modal = document.getElementsByClassName("modal")[0];

    // Get the element that closes the modal
    let modalClose = document.getElementsByClassName("modal-close")[0];

    // Get the modal-backdrop
    let modalBackdrop = document.getElementsByClassName("modal-backdrop")[0];


    /** close the modal */
    // When the user clicks on (x), close the modal
    modalClose.onclick = function() {
        modal.remove();
        modalBackdrop.remove();
    }

    // When the user clicks anywhere outside of the modal, close it
    modalBackdrop.onclick = function(event) {
        if (event.target == modalBackdrop) {
            modal.remove();
            modalBackdrop.remove();
        }
    }
}


    
})();
popup edited from: https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_modal
sr. member
Activity: 338
Merit: 337
August 18, 2020, 09:29:49 AM
#18
This kind of ideas were been popping recently by the great mind of 0x256
my friend my mind it not great Grin believe me..
about (userscript/style manager) userscript(js) and userstyle(css) this ideas exist before I know it and there are available extensions in most browsers

to modifying webpage style you can use "Stylus"‬ extension
to include or modifying javascript for any site/page you are visiting it search about Tampermonkey(for chrome)  or Greasemonkey(for firefox)

I apologize for not explaining in my posts about these additions because they may be harmful to some users..
Thus the user is free to choose the appropriate way to him

see also List of Bitcointalk.org Userscripts/ Add-ons
https://en.wikipedia.org/wiki/Userscript  https://en.wikipedia.org/wiki/Userscript_manager
hero member
Activity: 2184
Merit: 891
Leading Crypto Sports Betting and Casino Platform
August 18, 2020, 07:26:30 AM
#17
I guess what fits in here is both CSS and JavaScript by using some kind of extension that would let a user change both how the forum looks and reacts to certain things. This kind of ideas were been popping recently by the great mind of 0x256 in his css suggestions such as in "custom your bitcointalk header and profile page [css only]".

But I think it would be better if there would be three extensions made with this kind of suggestion. One is for the CSS extension that changes almost how all the forum design looks, one is for the Javascript (userscript) extension that allows users to have helpful features such as merit counters etc, and one is for both design and scripting which would allow users to have a responsive and themed Bitcointalk forum like hovering on one's username and showing a little bubble of any important information about him.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
August 18, 2020, 06:03:51 AM
#16
LoyceV has to agree to scraping his website (I'm pretty sure he is fine with it though).
Fine by me, although if someone wants all archived posts, it's easier if I create a compressed file.
If it's just fetching one post when someone clicks the edit date, it shouldn't produce much server load.
sr. member
Activity: 1288
Merit: 415
August 17, 2020, 10:37:14 PM
#15
Nice one! Question is how do I set it in my browser?

You can install it by using any userscript manager available for your preferred browser. For example you can use Tampermonkey for Chrome browser. One could easily find userscript manager plugins for most of the browser's out there to manage any script inside the browser itself.




What if we could apply a similar idea for Reply instead of opening a new page to Reply ?

This sounds more fun and user-friendly. I think you should go with a pop up reply option @0x256 ( nice name ).
sr. member
Activity: 840
Merit: 375
August 17, 2020, 03:20:39 PM
#14
pop up post edited history when click on edited date

just another idea more useful came to my (big mind Tongue)
depending on the LoyceV's Topic Details: highlight deleted and edited posts (forum wide)



https://loyce.club/archive/details/topic_5256854.html

post before edited: https://loyce.club/archive/posts/5465/54657219.html
post after edited(currently): https://loyce.club/archive/details/2020-07-13_Mon_18.37h/54657219.html

I don't know if this is possible what do you think?
I hope one of the developers can do this idea
Looks do-able via a browser extension too just like the one I showed in the above gif. I might give it a go once I get some free time, LoyceV has to agree to scraping his website (I'm pretty sure he is fine with it though). Nevertheless is it that interesting to see what an user original post was before editing it? I don't know, Need more opinions from the community especially the investigators/Scam buster part of it.
sr. member
Activity: 338
Merit: 337
August 17, 2020, 03:00:59 PM
#13
pop up post edited history when click on edited date

just another idea more useful came to my (big mind Tongue)
depending on the LoyceV's Topic Details: highlight deleted and edited posts (forum wide)



https://loyce.club/archive/details/topic_5256854.html

post before edited: https://loyce.club/archive/posts/5465/54657219.html
post after edited(currently): https://loyce.club/archive/details/2020-07-13_Mon_18.37h/54657219.html

I don't know if this is possible what do you think?
I hope one of the developers can do this idea
sr. member
Activity: 1554
Merit: 413
August 17, 2020, 08:21:13 AM
#12
But it looks nicer and I think that's what 0x256 is trying to show us.
Visual improvement isn't a necessity.
Maybe not but anything that improves interface and user experience should be good right?
legendary
Activity: 2044
Merit: 1018
Not your keys, not your coins!
August 17, 2020, 08:08:44 AM
#11
Based on what "theymos" mentioned before [couldn't find that exact post], making small changes require tweaks in larger scales in order to ensure everything works properly and since this suggestion isn't solving an ongoing issue, I can't see this getting implemented anytime soon...
Is it what you can not find?
Sorry for the wait, when I went to implement this it ended up being quite a bit more of a can of worms than I originally thought because of opting out, preventing certain report-count-padding strategies, etc. It's still on my to-do list, but there are several things above it.

I opened my thread last year so I realized I was wrong to ask it.
sr. member
Activity: 338
Merit: 337
August 17, 2020, 06:38:59 AM
#10
Nice one! Question is how do I set it in my browser?
as a userscript...

What if we could apply a similar idea for Reply instead of opening a new page to Reply ?
I think maybe it might be more helpful for some user.

if anyone  interested to making similar , maybe he can use Bootstrap’s modal
Bootstrap has great user experience [ https://i.ibb.co/8mBVQkV/image.png ]  [ https://i.ibb.co/8sfsc8H/image.png ]
sr. member
Activity: 840
Merit: 375
August 17, 2020, 03:47:23 AM
#9
It can be implemented via an extension without much trouble with javascript



Ofcourse CSS styling can be added to the extension to make it more aesthetic

I might give it more time and release it if there is enough interest because personally I don't see much the utility except saving 5 seconds that it takes to open the user's profile on an other tab...
sr. member
Activity: 1372
Merit: 322
August 17, 2020, 03:38:43 AM
#8
Based on what "theymos" mentioned before [couldn't find that exact post], making small changes require tweaks in larger scales in order to ensure everything works properly and since this suggestion isn't solving an ongoing issue, I can't see this getting implemented anytime soon...
Someone from the forum can develop such an script easily. Why would forum have to implement this? It's not much of necessary although it would be good to have such option. Mostly it would a benefit for the campaign manager. There are some good users on the forum who play with forum things. I think they can develop a script.
legendary
Activity: 2240
Merit: 3150
₿uy / $ell ..oeleo ;(
August 17, 2020, 02:30:25 AM
#7
Do you think we will be seeing the forum transferred to the new forum software very soon? Let's say in the next five years :-P
I think that is a possible time frame, this is the last message from theymos I have come across regarding the status of the new forum software; it was vaguely optimistic and listed a few limitations which are delaying the transition (mainly security and privacy concerns), you should note that this was close to 20 months ago so it's possible some issues have been solved and new ones may have popped up.

Limited testing was one of the issues listed at that time and is the only one the community can collectively help out with: beta testing thread

The beta site is down for many years now and had not so much success. Instead there are a few more forums using Epochtalk now, and one of them is created by the other admin - Cyrus and his team exactly for the purpose of testing.
You can check it out here: https://coinbistro.com/
The more people testing it, the sooner we'll get the new software implemented.
You can also see the development overview thread here >

Back to the OP. The idea is OK but for me clicking the scroll button on the mouse do almost the same job Smiley
legendary
Activity: 2114
Merit: 2248
Playgram - The Telegram Casino
August 17, 2020, 01:57:40 AM
#6
Do you think we will be seeing the forum transferred to the new forum software very soon? Let's say in the next five years :-P
I think that is a possible time frame, this is the last message from theymos I have come across regarding the status of the new forum software; it was vaguely optimistic and listed a few limitations which are delaying the transition (mainly security and privacy concerns), you should note that this was close to 20 months ago so it's possible some issues have been solved and new ones may have popped up.

Limited testing was one of the issues listed at that time and is the only one the community can collectively help out with: beta testing thread
legendary
Activity: 2464
Merit: 3878
Hire Bitcointalk Camp. Manager @ r7promotions.com
August 17, 2020, 01:15:54 AM
#5
Nice one! Question is how do I set it in my browser?

- Perhaps it's better suited for "New forum software".
Do you think we will be seeing the forum transferred to the new forum software very soon? Let's say in the next five years :-P
legendary
Activity: 2968
Merit: 3406
Crypto Swap Exchange
August 17, 2020, 01:01:56 AM
#4
Based on what "theymos" mentioned before [couldn't find that exact post], making small changes require tweaks in larger scales in order to ensure everything works properly and since this suggestion isn't solving an ongoing issue, I can't see this getting implemented anytime soon...
- Perhaps it's better suited for "New forum software".

But it looks nicer and I think that's what 0x256 is trying to show us.
Visual improvement isn't a necessity.
sr. member
Activity: 1554
Merit: 413
August 16, 2020, 10:46:48 PM
#3
....
Btw, usually clicking on the username leads to the same details on the profile information page, so can't see any major difference in your script.
But it looks nicer and I think that's what 0x256 is trying to show us.

I prefer a pop up when viewing someone's profile than being redirected to another page.
sr. member
Activity: 1288
Merit: 415
August 16, 2020, 10:01:10 PM
#2
If you are trying to pop up the user information when clicked on the username, the thread title should be like "pop up user summary when click on the username".

Btw, usually clicking on the username leads to the same details on the profile information page, so can't see any major difference in your script.
sr. member
Activity: 338
Merit: 337
August 16, 2020, 08:34:23 PM
#1
example


unfortunately, I'm not a good programmer the above example has many mistakes

Jump to: