Jump to content

Is there a way using html/css to make it so that accesskey= 'x' triggers the  bookmarking of a page? If so is there a way to make said bookmark fall into a specific folder? (I feel like it'd require java..)

I ask because Im trying to use as much css/html as possible to make a webpage based game and using bookmarks as a save mechanic would be very useful

Link to comment
https://linustechtips.com/topic/1007145-another-nother-css-question/
Share on other sites

Link to post
Share on other sites

16 hours ago, Poly LLC said:

yes with javascript, look at this link https://stackoverflow.com/questions/3024745/cross-browser-bookmark-add-to-favorites-javascript, but not with plain html

I dont know enough about js to understand how to use that.... Im just starting to get somewhat confident with html...

It looks useful though

Link to post
Share on other sites

Im still tryin to figure out the best game mechanic, would you guy says using bookmarks for the exact page would be best or just a general load screen with rough locations fairly close to where you left off? If its bookmarks is there a way to also make the page reference the list of bookmarks you've made on a page itself or is that outta calibre?

I dunno, I got some ambitions with this and Im trying to get a feel for what is and isnt possible for machanics

16 hours ago, duncannah said:

Not possible. You could tell the user to press CTRL+D, but that's it.

That might be an option...

Link to post
Share on other sites

2 minutes ago, ThatBlockishWay said:

Im still tryin to figure out the best game mechanic, would you guy says using bookmarks for the exact page would be best or just a general load screen with rough locations fairly close to where you left off? If its bookmarks is there a way to also make the page reference the list of bookmarks you've made on a page itself or is that outta calibre?

 I dunno, I got some ambitions with this and Im trying to get a feel for what is and isnt possible for machanics

localStorage might be a good option: https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage

 

Bookmarks won't preserve page state.

🙂

Link to post
Share on other sites

2 minutes ago, duncannah said:

localStorage might be a good option: https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage

 

Bookmarks won't preserve page state.

Its just a choice based game anyway. Look at photo, read text, make choice, repeat kinda thing (each choice links to a new page)

Link to post
Share on other sites

1 minute ago, ThatBlockishWay said:

Its just a choice based game anyway. Look at photo, read text, make choice, repeat kinda thing (each choice links to a new page)

Oh, then bookmarks should be OK if it's on different pages. No modern browser supports bookmark adding via the web page anymore, so the only thing you can do is to ask the user to press CTRL+D

🙂

Link to post
Share on other sites

1 minute ago, duncannah said:

Oh, then bookmarks should be OK if it's on different pages. No modern browser supports bookmark adding via the web page anymore, so the only thing you can do is to ask the user to press CTRL+D

Okie, is there a way to reference the list of bookmarks you've added? Im trying to make it uber immersive and having a page you can pull up that just lists all the bookmarks would make it all fancy

Link to post
Share on other sites

1 minute ago, ThatBlockishWay said:

Okie, is there a way to reference the list of bookmarks you've added? Im trying to make it uber immersive and having a page you can pull up that just lists all the bookmarks would make it all fancy

Not possible with bookmarks, unless you wrap the game in an extension or something. You can do this if you use another method to store saves, like localStorage

🙂

Link to post
Share on other sites

Just now, duncannah said:

Not possible with bookmarks, unless you wrap the game in an extension or something. You can do this if you use another method to store saves, like localStorage

Aight, Ima look into implimenting that...  Thanks!

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×