aliasthomas, breezescodes
pronounshe/him
828written posts
offlinecurrently
bc
Summer '19 Bingo Completionist
this is my murder mittens ^-^
most scripts need to be put in the global footer or something pro boards style tag plugin doesnโt allow js iirc u.u Oh, yeah, not on a post-by-post basis. You can stick scripts in pretty much any HTML template, though, so long as it's one that applies to the page you want that script to load on, and it'll almost always work - just with some weird interactions with any Proboards-built-in pagination content. :'c
The specific script I was trying to work with, though, wanted to interact with classes inside posting templates, so like member-posted content. The Style Tag Plugin must convert the psuedo-HTML you write into a post's content into real HTML at some point, since you can inspect it on browser and it'll show up like any HTML - so I was wondering, if the script ran after that conversion, if it could still work as intended. Buuuuuut apparently not. Unfortunately, I'm absolute TRASH with javascript, so I dunno if it's just because the order of operations was all out of whack (which is to say, if the Jcink script I was using was trying to identify HTML in a post that was still being read in psuedo-HTML), or if I'd messed up something when converting it for Proboards use, or if it was. Just. Something else entirely. *stares at hands*
All that to say: coding hard.
yeah i remember running into this problem and iโm preeetty sure i put the script in the global footer and it fixed things i donโt remember specifically what i did, but i donโt think i added any kind of listener. i mean i somehow got it to work for hoenn OH WAIT I FOUND HOW I DID IT. go into plugins > build > style tag > components and u can edit the javascript~ look for style_tag.init() and youโll want to insert your script after each instance. (itโs a good idea to have your script in its own function so you can do this easily) note tho i had both 2.2 and 2.1 of the style plugin but i seemed to have specifically gone w 2.1? idk why but yeahks kfls the picture here is style plugin 2.1. i'm wondering if it was just what the site had tho so it might also work for other version another edit* in all likelihood u can probably justโฆ put the script @ the bottom lol. window.onload = function script() {}; u shouldnโt need to put it after every instance of style_tag.init(). havenโt tested this out, but that just doesnโt logic out lmao i was just new to js at the time zzzz
|
last edit on Nov 18, 2023 3:02:19 GMT by bc
|