Bitcoin Forum

Other => Meta => Topic started by: libert19 on April 27, 2023, 02:55:35 PM



Title: Copy button next to content in code command
Post by: libert19 on April 27, 2023, 02:55:35 PM
https://talkimg.com/images/2023/05/14/blob38d527dee0138d8b.jpeg

Wow such easy to copy signatures, much wow


Title: Re: Copy button next to content in code command
Post by: PX-Z on April 27, 2023, 03:08:57 PM
Sounds easy right? But that would be a hell in backend making a js script for that i assume, knowing you need add identifier for every code tags in the content.
I say it's possible but not worth the time, if its the only use case for creating that.


Title: Re: Copy button next to content in code command
Post by: Coin_trader on April 27, 2023, 03:09:53 PM
https://talkimg.com/images/2023/09/20/6opll.jpeg

Wow such easy to copy signatures, much wow

This is a good idea especially for mobile users like me that having a hard time selecting all the text inside the code. But since this is just a one time procedure in every campaign that I join, I just developed a way to easily copy it.

Start copying the signature code from the bottom part up-to the word code: above outside the code box. It will automatically copy all the content inside plus the code: text. Just delete the code: text when you input the signature code on your signature space.

This is how it’s done:
https://talkimg.com/images/2023/09/20/6oO61.jpeg
https://talkimg.com/images/2023/09/20/6oWjm.jpeg



Title: Re: Copy button next to content in code command
Post by: LoyceV on April 27, 2023, 03:52:15 PM
This is something campaign managers can do by themselves. They often add all kinds of eye candy (images) to their thread, and an external link to a .txt file with the signature would be an easy addition.

Then again, I can imagine they don't care: if you don't want to spend the few seconds it takes to copy the signature, you may not be the best candidate.


Title: Re: Copy button next to content in code command
Post by: joker_josue on April 27, 2023, 03:57:47 PM
Sounds easy right? But that would be a hell in backend making a js script for that i assume, knowing you need add identifier for every code tags in the content.
I say it's possible but not worth the time, if its the only use case for creating that.

I don't think it's something extremely complicated to implement, but there will be another javascript to load on the page that would only be useful in half a dozen scenarios. Would it be useful? Yes. Is there a need for that? I agree with you that there is no need.

As @LoyceV commented, campaign managers solved this even easier with a txt file. But, back to the same: would it be useful? Perhaps. Is this implementation worth it? Probably not, few would use it.


Title: Re: Copy button next to content in code command
Post by: rdluffy on April 27, 2023, 05:03:12 PM

This is a good idea especially for mobile users like me that having a hard time selecting all the text inside the code. But since this is just a one time procedure in every campaign that I join, I just developed a way to easily copy it.


When I was looking for a signature campaign I came across this problem.
I spent a good few minutes trying to copy the signature text correctly and couldn't (seriously), I gave up and waited to get access to a PC to copy it correctly.

I can't complain because I like the forum the way it is, this style of forum I am getting used to a long time ago and it is very easy to navigate, but the mobile part is really difficult, I don't even try to post on my phone anymore.
But even in a computer, the field code is weird, the CTRL + A command doesn't work inside the box.

This is something campaign managers can do by themselves. They often add all kinds of eye candy (images) to their thread, and an external link to a .txt file with the signature would be an easy addition.
...

It's a simple and good idea
Despite the difficulties it is usually a very rare action to copy the signature, users do it only once when they join the campaign or when there is an update.



Let's summon some user here  :D
@TryNinja, can you add a button to copy the content of a code field?


Title: Re: Copy button next to content in code command
Post by: light_warrior on April 27, 2023, 05:33:38 PM
This is a good idea especially for mobile users like me that having a hard time selecting all the text inside the code.

Excuse me, but may I ask what system you use? I mean iOS or Android? I use an Android tablet all the time and I have no problem at all with highlighting and copying. You just highlight one word, then a popup appears where you can select "Select All". Press it, all that is in the window will be highlighted. That's all, you can copy. No problem.


Title: Re: Copy button next to content in code command
Post by: ZAINmalik75 on April 27, 2023, 05:53:55 PM
https://i.imgur.com/GCf5yEo.jpg
Wow such easy to copy signatures, much wow
Wow it's very useful tool which should be added to Bitcointalk to copy these signature codes. I am smart phone user and whenever i want to copy signature codes its copy whole page and some time i have to skip 3-4 times and then i succeed after boring copy method. If such kind of tool added than it will become much easier and significant to copy signature codes at once.
In my mind Thier should be two way to implement these feature in btt. Firstly if by chance Theymos watchout this thread and find it useful then he will do own coding to add this which will be much better, easy and more professional. Second if someone add this feature using extension then Mobile users should use Kiwi or any extension supported browser to use this copy feature.


Title: Re: Copy button next to content in code command
Post by: uchegod-21 on April 27, 2023, 09:01:29 PM
https://i.imgur.com/GCf5yEo.jpg

Wow such easy to copy signatures, much wow
Great suggestions. As a member ranked user when yahoo62278 accepted me in the first campaign I partook (Gamdom), I had very big issues to wear signature that very night. Even till now, it still gives issues, what I do is to copy the whole codes for all ranks, to a notepad and then delete the unwanted parts.

Sounds easy right? But that would be a hell in backend making a js script for that i assume, knowing you need add identifier for every code tags in the content.
I say it's possible but not worth the time, if its the only use case for creating that.
For experienced people, I don't think it will be very difficult from backend. Maybe we have to invite powerGlove


Title: Re: Copy button next to content in code command
Post by: SquirrelJulietGarden on April 27, 2023, 09:34:37 PM
Signature campaigns are not moderated by the forum like scam are not moderated here.

I don't think it will be deployed by theymos. By limitations and difficulty with SMF forum software and his limited time to moderate the forum and code for the forum upgrade.

Your proposal looks cool and convenient for forum users who want to join signature campaign but can not access computer when they want to copy the code.

If you are on phone, don't copy it directly from a post, but click on quote and copy it. With quote, you can more easily to scroll up and down to cut the part you want to copy.

It can be done with SMF patch or userscripts from forum community coders.


Title: Re: Copy button next to content in code command
Post by: Igebotz on April 27, 2023, 10:07:33 PM
For experienced people, I don't think it will be very difficult from backend. Maybe we have to invite powerGlove

PowerGlove is busy right now, so I doubt he'd be interested in this one, especially because the campaign manager could compile it into a text file and place it under each signature code for mobile users to easily copy.. there is already ignore thread button proposal he is also handling too


If you are on phone, don't copy it directly from a post, but click on quote and copy it. With quote, you can more easily to scroll up and down to cut the part you want to copy.

This is the way I use anytime I'm on my phone and need to modify my signature; it's much easier than highlighting and copying from the main post, but you still have to go through some tedious scrolling, especially if the Op has a lot of details on it. However, this is the best option for everyone who uses a mobile device.


Title: Re: Copy button next to content in code command
Post by: Cryptomiles1 on April 27, 2023, 11:02:34 PM
If you are on phone, don't copy it directly from a post, but click on quote and copy it. With quote, you can more easily to scroll up and down to cut the part you want to copy.

I mostly find it difficult to copy signature from my smartphone, but anytime I want to copy it became too bulky for me to get the line I want to copy since my android phone is not that large enough for me and most of it are very tiny to view. I wait whenever I gets to my pc I turn on and apply code, but if that copy option could work fine with smartphone it will be nice then with pc users can manually just take like 5 to 10 second to apply code & avatar.


Title: Re: Copy button next to content in code command
Post by: virasog on April 27, 2023, 11:14:25 PM
https://i.imgur.com/GCf5yEo.jpg

Wow such easy to copy signatures, much wow

This is a suggestion from your side . Right  ???
Better write it clearly becasue when i saw your post, i immediately open one of the campaigns to see if this new feature is implemented but it was not the case.


I mostly find it difficult to copy signature from my smartphone, but anytime I want to copy it became too bulky for me to get the line I want to copy since my android phone is not that large enough for me and most of it are very tiny to view. I wait whenever I gets to my pc I turn on and apply code, but if that copy option could work fine with smartphone it will be nice then with pc users can manually just take like 5 to 10 second to apply code & avatar.

Copying the signature code manually may be difficult on the smartphone but it is very easy to copy signatures on the computer. You just need to select the right text (only code) by selecting the code from the top till the end by scrolling with the mouse and pressing the Ctrl+ C and then pasting it with Ctrl+V on the signature space. I don't think anyone should face any difficulty with this. Doing it once or twice makes you an expert on this.  ;)


Title: Re: Copy button next to content in code command
Post by: Adbitco on April 27, 2023, 11:50:20 PM
This function may not be smooth and cool for Thymos to implement since is just a signature, but i believe if he founds it very useful he may decides. But i don't think this is a big deal because every member should just devote few moment of their time to apply code manually and straight up to their works. So if that is being applied how do go of the avatar do you still go manually to apply it or you needed an auto mechanism that will allow you wear it without going through manually?


Title: Re: Copy button next to content in code command
Post by: Husires on April 28, 2023, 12:03:43 AM
It is a task that takes 3 seconds for a person to perform, that requires a lot of modifications to be made in the forum.

You do not join signature campaigns daily, and at the worst, you do that once a week or a month. The effort it takes to do it is less than 3 seconds per week or month, and the campaign manager can attach .txt link to facilitate the task, and therefore there is no real benefit for Copy button


Title: Re: Copy button next to content in code command
Post by: TryNinja on April 28, 2023, 12:07:40 AM
In the meanwhile... ;D

Quote

Use it with Tampermonkey, ViolentMonkey, etc...

Code:
// ==UserScript==
// @name         Copy Code to Clipboard
// @version      0.1
// @description  Click the codeheader to copy the content to your clipboard
// @author       TryNinja
// @match        https://bitcointalk.org/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=bitcointalk.org
// ==/UserScript==

(function() {
      'use strict';
 
      const codeheaders = document.querySelectorAll('.codeheader');
 
      const copyCode = id => {
          const header = document.querySelector(`.${id}`);
          const copyBtn = document.querySelector(`.${id} > button`);
          const code = header.nextElementSibling;
          navigator.clipboard.writeText(code.innerText).then(() => {
              copyBtn.textContent = 'Code: (copied!)';
          });
      }
 
      for (const codeheader of codeheaders) {
          const rand = Math.floor(Math.random() * 10e6);
          const id = `code-${rand}`;
          codeheader.classList.add(id);
          codeheader.innerHTML = `<button type="button" style="border: 0; background: none; color: rgb(136, 169, 195); font-weight: bold;">Code: (click to copy)</button>`;
          const copyBtn = document.querySelector(`.${id} > button`);
          copyBtn.addEventListener('click', () => copyCode(id));
      }
  })();


Title: Re: Copy button next to content in code command
Post by: hd49728 on April 28, 2023, 02:27:30 AM
In the meanwhile... ;D
Welcome, you have many contributions in userscripts, bots for the forum.

I counted 5 in total (https://bitcointalk.org/index.php?topic=5148488.msg62144582#msg62144582) in my List of Bitcointalk.org Userscripts/ Add-ons / SMF patches. Please inform me if I miss any of your userscripts, bots.


Title: Re: Copy button next to content in code command
Post by: libert19 on April 28, 2023, 03:34:24 AM
This is a good idea especially for mobile users like me that having a hard time selecting all the text inside the code.

Excuse me, but may I ask what system you use? I mean iOS or Android? I use an Android tablet all the time and I have no problem at all with highlighting and copying. You just highlight one word, then a popup appears where you can select "Select All". Press it, all that is in the window will be highlighted. That's all, you can copy. No problem.

I use android phone, when I click 'select all', whole thread gets highlighted. What browser do you use?

This is a suggestion from your side . Right  ???
Better write it clearly becasue when i saw your post, i immediately open one of the campaigns to see if this new feature is implemented but it was not the case.

Wow, feeling really proud of my edit right now  :D

This function may not be smooth and cool for Thymos to implement since is just a signature, but i believe if he founds it very useful he may decides. But i don't think this is a big deal because every member should just devote few moment of their time to apply code manually and straight up to their works. So if that is being applied how do go of the avatar do you still go manually to apply it or you needed an auto mechanism that will allow you wear it without going through manually?


Avatar is easy to do, signatures are annoying on mobile and this idea popped up in my mind so I created the post. I could care less whether this gets implemented or not, some of you appear to take these threads seriously than intended.


Beauty! Works fine on android!! I use Lemur, any extension supported browser should work.


Title: Re: Copy button next to content in code command
Post by: light_warrior on April 28, 2023, 09:01:19 AM
This is a good idea especially for mobile users like me that having a hard time selecting all the text inside the code.

Excuse me, but may I ask what system you use? I mean iOS or Android? I use an Android tablet all the time and I have no problem at all with highlighting and copying. You just highlight one word, then a popup appears where you can select "Select All". Press it, all that is in the window will be highlighted. That's all, you can copy. No problem.

I use android phone, when I click 'select all', whole thread gets highlighted. What browser do you use?

Yes, you're right, I tried to highlight the contents of the window and it didn't work. For some reason the entire page is highlighted. Strange, maybe the highlighting behaves differently in a differently designed window? I have several browsers and the same thing happens in all of them.


Title: Re: Copy button next to content in code command
Post by: Coin_trader on April 28, 2023, 03:26:49 PM
This is a good idea especially for mobile users like me that having a hard time selecting all the text inside the code.

Excuse me, but may I ask what system you use? I mean iOS or Android? I use an Android tablet all the time and I have no problem at all with highlighting and copying. You just highlight one word, then a popup appears where you can select "Select All". Press it, all that is in the window will be highlighted. That's all, you can copy. No problem.

Hmmm. I’m using both an Android and IOS since I became here in the forum and this problem on copying signature code is in there. I wonder how can you select all the signature code without copying the whole text on the thread. The code command doesn’t separate the signature code inside to all the text outside so using a select all when you highlighted one word on the signature code will not gonna work.

If this is working then the OP probably won’t create this thread and I will be happy but this problem is still my struggle because I just try it on all of my handheld device without a good result.

Can you provide screen record on how you do this?


Title: Re: Copy button next to content in code command
Post by: Little Mouse on April 28, 2023, 06:24:19 PM
If I'm correct, there's a "Select All" option in smf but I'm not sure if that's compatible with the current version of the forum software. I can't remember where I used it (seems like in bitcointalk lol) but with that "Select All" option, the code written next to the "Select All" tag, could be selected and easily copied. I don't think it will be a lot of work to implement this if this exists in smf.


If this is working then the OP probably won’t create this thread and I will be happy but this problem is still my struggle because I just try it on all of my handheld device without a good result.

Can you provide screen record on how you do this?
I think LW is missing something here. Well, with a tablet, it's easier to select the code while with a mobile, it's almost impossible lol. I had to quote the whole OP and then find out the signature code section according to my rank lol and copy it.


Title: Re: Copy button next to content in code command
Post by: Sandra_hakeem on April 28, 2023, 07:33:25 PM
....i thought it's totally stress free to spare 3-5 seconds of the time you've got to marque select the signature code and paste it wherever you choose to?? I mean, the essence of inventing and writing new codes is to make every hard process more simpler and less-stressful...so how about this??
I wrote something the other time; I believe people that needed to learn, read from it... (Though it wasn't an unanimous statement)... I said - it's good to have 'em modifications and all of that, but it'll only make the process to surf the forum and understand how 'em coded function is made to snyc more tough than we have now...

Sandra 🧑‍🦰


Title: Re: Copy button next to content in code command
Post by: Mitchell on April 28, 2023, 09:24:21 PM
In the meanwhile... ;D

Quote
[image]

Use it with Tampermonkey, ViolentMonkey, etc...

[...]
Isn't it about time you open an account on GreasyFork (https://greasyfork.org/en/)/a repo on GitHub to easily share all the different scripts you've made? :D


Title: Re: Copy button next to content in code command
Post by: light_warrior on May 04, 2023, 03:29:28 PM
This is a good idea especially for mobile users like me that having a hard time selecting all the text inside the code.

Excuse me, but may I ask what system you use? I mean iOS or Android? I use an Android tablet all the time and I have no problem at all with highlighting and copying. You just highlight one word, then a popup appears where you can select "Select All". Press it, all that is in the window will be highlighted. That's all, you can copy. No problem.

Hmmm. I’m using both an Android and IOS since I became here in the forum and this problem on copying signature code is in there. I wonder how can you select all the signature code without copying the whole text on the thread. The code command doesn’t separate the signature code inside to all the text outside so using a select all when you highlighted one word on the signature code will not gonna work.

If this is working then the OP probably won’t create this thread and I will be happy but this problem is still my struggle because I just try it on all of my handheld device without a good result.

Can you provide screen record on how you do this?

The point is that selection behaves differently in different parts of the forum. I tried highlighting code in the window that is located in the profile settings under Forum Profile Information. And there the selection works as it should. You can try it yourself. It turns out that the problem is in the forum engine itself, I think.


Title: Re: Copy button next to content in code command
Post by: Aanuoluwatofunmi on May 04, 2023, 04:01:59 PM

If you are on phone, don't copy it directly from a post, but click on quote and copy it. With quote, you can more easily to scroll up and down to cut the part you want to copy.

What a good idea, as simple as this could be I'd never thought about doing it than always on selecting the codes for copy which is a very big task to do about, i think this is a very simple and ideal way to easily copy a signature code, the campaign managers cannot implement a new feature to the forum except it has been discussed and approved by the admin, meanwhile another solution is for the campaign managers to always provide a link to select only the signature codes for copy aside the ones on the campaign thread which is a bit tasking to copy.