Browser Extension Vote-Counter (early demo)

This forum is for discussion related to the game.
User avatar
Zachrulez
Zachrulez
Jack of All Trades
User avatar
User avatar
Zachrulez
Jack of All Trades
Jack of All Trades
Posts: 8550
Joined: December 5, 2008
Location: Minnesota

Post Post #75 (ISO) » Fri Nov 10, 2023 8:49 pm

Post by Zachrulez »

My understanding from what I've read on the download page is that the extension is compatible with Chromium based browsers so it's effectively compatible with virtually every web browser. (Except for Firefox)
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 13224
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Post Post #76 (ISO) » Fri Nov 10, 2023 10:59 pm

Post by JacksonVirgo »

In post 75, Zachrulez wrote: My understanding from what I've read on the download page is that the extension is compatible with Chromium based browsers so it's effectively compatible with virtually every web browser. (Except for Firefox)
Yeah exactly, the process might be slightly different depending on how they wanted to pay the extensions menu out but if you scan the process should be

1. Turn dev mode on
2. Find the load unpacked button
3. Find downloaded v3 folder and open it (or the manifest.json file within)
4. If v3 fails attempt the same with the v2 folder
"Am I a ghost like you, caught between the seams of two intertwining melodies?"


wiki // GTKAS
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 13224
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Post Post #77 (ISO) » Fri Nov 10, 2023 11:00 pm

Post by JacksonVirgo »

In post 74, DragonEater70 wrote:
In post 71, DragonEater70 wrote:
In post 67, JacksonVirgo wrote: Edge is hilariously chrome-based now, so it should work for it
Does it have the same installation process as google chrome?
I mean the extension not the browser
I checked for the MacOS version and it does, where the buttons to do it are shuffled around but they’re there and easy to find
"Am I a ghost like you, caught between the seams of two intertwining melodies?"


wiki // GTKAS
User avatar
DragonEater70
DragonEater70
He/Him
Jack of All Trades
User avatar
User avatar
DragonEater70
He/Him
Jack of All Trades
Jack of All Trades
Posts: 7770
Joined: February 4, 2023
Pronoun: He/Him
Location: UTC+2

Post Post #78 (ISO) » Fri Nov 10, 2023 11:03 pm

Post by DragonEater70 »

Yeha I managed to do it, but I can't seem to understand how to configure the definitions file.
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 13224
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Post Post #79 (ISO) » Fri Nov 10, 2023 11:06 pm

Post by JacksonVirgo »

In post 78, DragonEater70 wrote: Yeha I managed to do it, but I can't seem to understand how to configure the definitions file.
Could you show me what you have and I can fix it up where appropriate?

Soon I will have this all be in the form so you don’t have to touch a text file but been busy with other projects for now.
"Am I a ghost like you, caught between the seams of two intertwining melodies?"


wiki // GTKAS
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 13224
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Post Post #80 (ISO) » Fri Nov 10, 2023 11:06 pm

Post by JacksonVirgo »

Whether that’s DMs or here
"Am I a ghost like you, caught between the seams of two intertwining melodies?"


wiki // GTKAS
User avatar
Aureal
Aureal
she/her
Mafia Scum
User avatar
User avatar
Aureal
she/her
Mafia Scum
Mafia Scum
Posts: 3691
Joined: September 9, 2005
Pronoun: she/her

Post Post #81 (ISO) » Fri Dec 15, 2023 2:31 pm

Post by Aureal »

Yeah, the file formatting is possibly not explained well enough. A sample file might help? My first attempt at formatting the .yaml file led to absolutely nothing happening when I clicked the button. Removing the parts other than the playerlist and changing the indentation of the names through direct copy-paste of the formatting makes it
try
to do something, but it just pulses circles forever until leaving the page. Tested it on both Edge and Opera.

Is it supposed to actually be able to located the .json file when loading the extension? It loads when I navigate to the folder the file is in and tell it to use that folder so I thought that was good enough, but the file browser isn't actually
seeing
the file there.
"Yeah after a point it felt like Aureal was the only one talking sense despite being a goose so I just followed."
-furtiveglance
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 13224
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Post Post #82 (ISO) » Sun Dec 17, 2023 2:00 am

Post by JacksonVirgo »

In post 81, Aureal wrote: Yeah, the file formatting is possibly not explained well enough. A sample file might help? My first attempt at formatting the .yaml file led to absolutely nothing happening when I clicked the button. Removing the parts other than the playerlist and changing the indentation of the names through direct copy-paste of the formatting makes it
try
to do something, but it just pulses circles forever until leaving the page. Tested it on both Edge and Opera.

Is it supposed to actually be able to located the .json file when loading the extension? It loads when I navigate to the folder the file is in and tell it to use that folder so I thought that was good enough, but the file browser isn't actually
seeing
the file there.
Ah thanks for reminding me to format/explain an example better. How large is the game you are trying to make it work for?
It doesn't need to be in the .json file no, it can be located anywhere.

I'll write up a more in depth explanation as to how you can set up the settings.
"Am I a ghost like you, caught between the seams of two intertwining melodies?"


wiki // GTKAS
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 13224
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Post Post #83 (ISO) » Sun Dec 17, 2023 2:17 am

Post by JacksonVirgo »

The .yaml settings file can contain a few sections, I will list them below with a description of how to write them. Like always, the player list is the only that is required.

Spoiler: Explanations

The hash (#) means anything afterwards is a comment (does nothing), and thus can be ignored/deleted.

Unless you know what you are doing, keep the formatting as strict to what I've written as you can

Player List

List all the current players, remove any players that are replaced out and add in their new account. This will be done automatically on a later update, but for now it needs to be done.

Code: Select all

players:
	- player_name
	- second_player_name


Dead

List all the dead players, and the post they have died in.

Code: Select all

dead:
	player_name: 123 # Post number of which they died.


Replacements

For each individual replacement, show who was replaced by who.
Make sure to create a brand new list item for each new replacement, even if it was from a slot that had a replacement before.
Below is an example player_one was replaced by player_two who then went and replaced out again.

Code: Select all

replacements:
    player_one:
        - player_two
    player_two:
        - most_recent_player


Aliases / Nicknames

Sometimes the bot cannot know the difference between what people are referred to as (CSF) as compared to what they are listed as under this tool (Cat Scratch Fever). List out all you know they're being referred under in this section

Code: Select all

aliases:
    username:
        - Alias1
        - Alias2
    Cat Scratch Fever:
        - CSF



Spoiler: Full Example

Code: Select all

## List all the current players here.
## You will need to list replacements here and in a replacements section
## The duplication will be removed in a later version
players:
    - Username
    - Username2
    
## List all the players that have died, and the post they died in.
dead:
    Username: 123 # Post number of which they died.
    
## For each individual replacement, show who was replaced by who. Create a brand new list item for each new replacement, even if it was from a slot that had a replacement before.

replacements:
    OldPlayerUsername:
        - NewPlayerUsername
    player2:
        - player2's replacement

startFrom: 123 # Post number of which to start from (usually a day start, if not added defaults to post 0)
endAt: 909 # If added, ends the counting at a particular post.

aliases:
    Username:
        - Alias1
        - Alias2
    Username2:
        - OtherAlias
"Am I a ghost like you, caught between the seams of two intertwining melodies?"


wiki // GTKAS
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 13224
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Post Post #84 (ISO) » Sun Dec 17, 2023 2:19 am

Post by JacksonVirgo »

I also thought I had some kind of display to show steady progress, to see it's actually working and not frozen (not talking about the spinner), if not that's probably something I should add ASAP
"Am I a ghost like you, caught between the seams of two intertwining melodies?"


wiki // GTKAS
User avatar
Aureal
Aureal
she/her
Mafia Scum
User avatar
User avatar
Aureal
she/her
Mafia Scum
Mafia Scum
Posts: 3691
Joined: September 9, 2005
Pronoun: she/her

Post Post #85 (ISO) » Sun Dec 17, 2023 5:28 am

Post by Aureal »

Yeah, I can't see that I'm doing anything that doesn't match your example. I'm not familiar specifically with .yaml format but I'm not totally ignorant of code and nothing in the further explanation helps figure out what's going on. I copy/pasted the playerlist section directly from your latest example here to make sure the spacing was what's intended and it's still just simply doing nothing again when I click the button (after trying to adjust things further I was never able to get back to even seeing the eternally-pulsing circle again. And yes, the circle is all I got when I had it, there was no text accompanying it like in your demo video).

Spoiler: just using the playerlist for a barebones effort

Code: Select all

players:
	- Black
	- NekoLover
	- DragonEater70
	- FakeGod
	- Klick
	- Titus
	- Dannflor
	- Skygazer
	- Claptastik

for the game here if you want to see if it works for you, all I can think right now is there's some incompatibility with my system. I don't really feel like putting all this on Chrome just to test whether somehow straight-up Chrome will work where other browsers fail. :?
"Yeah after a point it felt like Aureal was the only one talking sense despite being a goose so I just followed."
-furtiveglance
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 13224
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Post Post #86 (ISO) » Sun Dec 17, 2023 9:39 pm

Post by JacksonVirgo »

In post 85, Aureal wrote: Yeah, I can't see that I'm doing anything that doesn't match your example. I'm not familiar specifically with .yaml format but I'm not totally ignorant of code and nothing in the further explanation helps figure out what's going on. I copy/pasted the playerlist section directly from your latest example here to make sure the spacing was what's intended and it's still just simply doing nothing again when I click the button (after trying to adjust things further I was never able to get back to even seeing the eternally-pulsing circle again. And yes, the circle is all I got when I had it, there was no text accompanying it like in your demo video).

Spoiler: just using the playerlist for a barebones effort

Code: Select all

players:
	- Black
	- NekoLover
	- DragonEater70
	- FakeGod
	- Klick
	- Titus
	- Dannflor
	- Skygazer
	- Claptastik

for the game here if you want to see if it works for you, all I can think right now is there's some incompatibility with my system. I don't really feel like putting all this on Chrome just to test whether somehow straight-up Chrome will work where other browsers fail. :?
Ah right, it seems using tabs instead of spaces don't work even though I expected them to.
I tried the following and it worked with your linked thread, give this a whirl.

Spoiler:

Code: Select all

players:
    - Black
    - NekoLover
    - DragonEater70
    - FakeGod
    - Klick
    - Titus
    - Dannflor
    - Skygazer
    - Claptastik
"Am I a ghost like you, caught between the seams of two intertwining melodies?"


wiki // GTKAS
User avatar
Aureal
Aureal
she/her
Mafia Scum
User avatar
User avatar
Aureal
she/her
Mafia Scum
Mafia Scum
Posts: 3691
Joined: September 9, 2005
Pronoun: she/her

Post Post #87 (ISO) » Tue Dec 19, 2023 6:36 pm

Post by Aureal »

Yeah, it's good now; knowing it needs indentation of four spaces instead of tab makes all the difference.
"Yeah after a point it felt like Aureal was the only one talking sense despite being a goose so I just followed."
-furtiveglance
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 13224
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Post Post #88 (ISO) » Wed Dec 20, 2023 5:20 am

Post by JacksonVirgo »

In post 87, Aureal wrote: Yeah, it's good now; knowing it needs indentation of four spaces instead of tab makes all the difference.
Amazing stuff, if you feel anything is clunky or you'd like for any stuff to be added to it feel free to let me know and I can see what I can do.

(I will be removing the need for a file to begin with, but that was always coming just need time to sink into this again)
"Am I a ghost like you, caught between the seams of two intertwining melodies?"


wiki // GTKAS
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 13224
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Post Post #89 (ISO) » Sun Jan 07, 2024 6:09 pm

Post by JacksonVirgo »

General update time, none of these changes are available right now unless you compile it yourself (the new game def isn't added, at all but I wanna see if people have thoughts one way or another on that first)

I added a popup menu you can use to select which additional functionality you want to use, all of them except the vote-counter will be disabled by default. The only one I have now is quote highlighting, making it very easy to see where you're being quoted (and sub-quoted). I've been using it for a while to see how well it works and I love it so I feel so will you.

Now that 3+ people have had issues with using yaml, and how I realised how bad the actual file is formatted I wanted to abandon cross-compatibility with osuka's tool (rip) and focus on a .toml format which allows for linking data close together so all information about a single player is next to each other.

As you can probably tell via intuition, each [[player]] creates a new player underneath it with whatever information you need about them. One stipulation I gotta make though is that even replaced players are labelled as [[player]] and must not be deleted but instead have a "replaced" value of them in the slot that replaced them. If this is too confusing I can add a [[replaced]] to be used instead but I don't feel that's necessary.

Code: Select all

start_from = 123
end_at = 456

[[player]]
name = "JacksonVirgo"
aliases = "JV, Virgo" # create as many aliases as you want seperated by a comma
replaced = "Cat Scratch Fever" # who the player replaced, if any
died_at = 123 # post number the player died at

[[player]]
name = "Psyche"

[[player]]
name = "Cat Scratch Fever"
aliases = "CSF"


This is much easier to understand I feel than having everything split all over the place.

If I don't get any feedback (and that's okay <3) I'll likely move to this format going forward.
"Am I a ghost like you, caught between the seams of two intertwining melodies?"


wiki // GTKAS
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10721
Joined: April 28, 2011
Pronoun: he/they

Post Post #90 (ISO) » Sun Jan 07, 2024 6:25 pm

Post by Psyche »

i can imagine the potential issues but feel like it’d be ideal would be something close to what mods already include in their OPs - or, say, something suitable for said inclusion. maybe can use the archive threads as a reference if it’s worh the trouble; they include most of these details in a structured but plain languagy format except alias.
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 13224
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Post Post #91 (ISO) » Sun Jan 07, 2024 6:32 pm

Post by JacksonVirgo »

In post 90, Psyche wrote: i can imagine the potential issues but feel like it’d be ideal would be something close to what mods already include in their OPs - or, say, something suitable for said inclusion. maybe can use the archive threads as a reference if it’s worh the trouble; they include most of these details in a structured but plain languagy format except alias.
Are you talking about putting the data in post 0? I did wanna eventually have many ways of giving the VC settings such as file upload, post 0, custom UI form (storing in the extensions storage, or possibly on my mafia engine bots database so that many people can use it). Etc

I've just been procrastinating pretty hard on building out the UI to do it through that which is by far the most user-friendly way to do it. Exporting to the .toml file is also a good thing to share the settings with other hosts.
"Am I a ghost like you, caught between the seams of two intertwining melodies?"


wiki // GTKAS
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 13224
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Post Post #92 (ISO) » Sun Jan 07, 2024 9:18 pm

Post by JacksonVirgo »

I mean I hate CSS so much and I've been having issues with the layout given the choices I've made which is why I have been procrastinating making the form fully complete so I decided to dump the current popup style and instead have the form on the page itself, like here's a video of where I'd put it (which it looks so cool too so I'm trying to show off my idea :sob: )

"Am I a ghost like you, caught between the seams of two intertwining melodies?"


wiki // GTKAS
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10721
Joined: April 28, 2011
Pronoun: he/they

Post Post #93 (ISO) » Mon Jan 15, 2024 5:39 pm

Post by Psyche »

ive gotten pretty handy at javascript/typescript now, so that's one barrier to entry gone for me to actually do things
but yknow, i'm probably just blowing hot air
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 13224
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Post Post #94 (ISO) » Mon Jan 15, 2024 6:15 pm

Post by JacksonVirgo »

In post 93, Psyche wrote: ive gotten pretty handy at javascript/typescript now, so that's one barrier to entry gone for me to actually do things
but yknow, i'm probably just blowing hot air
Oh huge W
"Am I a ghost like you, caught between the seams of two intertwining melodies?"


wiki // GTKAS
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 13224
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Post Post #95 (ISO) » Mon Jan 15, 2024 6:16 pm

Post by JacksonVirgo »

The repo is currently in a form of transitional period of sorts where I realised the code was absolutely all over the place so I'm trying to structure it better.

I also gotta update the README so that it's very obvious how to set it up and work on it
"Am I a ghost like you, caught between the seams of two intertwining melodies?"


wiki // GTKAS
User avatar
Thestatusquo
Thestatusquo
He/Him
Shea

User avatar
User avatar
Thestatusquo
He/Him
Shea

Shea

Posts: 14371
Joined: July 27, 2006
Pronoun: He/Him
Location: Chicago!

Post Post #96 (ISO) » Mon Jan 15, 2024 6:47 pm

Post by Thestatusquo »

In post 92, JacksonVirgo wrote: I mean I hate CSS so much and I've been having issues with the layout given the choices I've made which is why I have been procrastinating making the form fully complete so I decided to dump the current popup style and instead have the form on the page itself, like here's a video of where I'd put it (which it looks so cool too so I'm trying to show off my idea :sob: )

Similar to last time if you've got css questions I'm happy to rubber duck
tout comprendre c'est tout pardonner
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 13224
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Post Post #97 (ISO) » Mon Jan 15, 2024 7:06 pm

Post by JacksonVirgo »

In post 96, Thestatusquo wrote:
In post 92, JacksonVirgo wrote: I mean I hate CSS so much and I've been having issues with the layout given the choices I've made which is why I have been procrastinating making the form fully complete so I decided to dump the current popup style and instead have the form on the page itself, like here's a video of where I'd put it (which it looks so cool too so I'm trying to show off my idea :sob: )

Similar to last time if you've got css questions I'm happy to rubber duck
Ooo thank you I'll do exactly that. I wanted to add a players tab, where you can add/remove/edit player data in the UI itself rather than with a game definition file.

I seemed to do it fine, the form for editing the user itself was perfectly fine. It was anything to do with scrolling. I wanted to list them all and have an internal scrollbar for if there's more players than what fits on the UI. But it didn't scroll no matter what I seemed to do, it just made the popup larger to fit the data which I don't really know how to fix.

Although now that I'm saying this now, if I put a max-height on the UI itself it should lock up at a particular height and then scroll internally. I'll give that a stab
"Am I a ghost like you, caught between the seams of two intertwining melodies?"


wiki // GTKAS
User avatar
Thestatusquo
Thestatusquo
He/Him
Shea

User avatar
User avatar
Thestatusquo
He/Him
Shea

Shea

Posts: 14371
Joined: July 27, 2006
Pronoun: He/Him
Location: Chicago!

Post Post #98 (ISO) » Mon Jan 15, 2024 7:28 pm

Post by Thestatusquo »

Sounds like you need to do something with the overflow property.
tout comprendre c'est tout pardonner
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 13224
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Post Post #99 (ISO) » Mon Jan 15, 2024 7:42 pm

Post by JacksonVirgo »

Setting a max height for the form seemed to do it
"Am I a ghost like you, caught between the seams of two intertwining melodies?"


wiki // GTKAS
Post Reply

Return to “Mafia Discussion”