Simple Machines Community Forum

General Community => Scripting Help => Topic started by: Jailer on February 05, 2024, 06:59:47 PM

Title: Question about JS and SMF version reporting
Post by: Jailer on February 05, 2024, 06:59:47 PM
Have kind of an oddball question. I've got someone working on something for me and he needs to know if there is a JS-way to determine if the browser is rendering SMF 2.0 or SMF 2.1? Is there something specific between the 2 versions that could be determined by using a "needle" when it is being rendered by the browser?
Title: Re: Question about JS and SMF version reporting
Post by: Diego Andrés on February 05, 2024, 07:22:10 PM
Just check the footer, it should display the current version of the forum.
Or if you go to ?action=credits
Title: Re: Question about JS and SMF version reporting
Post by: Arantor on February 05, 2024, 08:29:25 PM
You shouldn't rely on the footer or the credits page to sniff the version.

Probably the safest way at present is to make sure your code is loaded after script.js and check for presence of reqOverlayDiv (it's only in 2.1)
Title: Re: Question about JS and SMF version reporting
Post by: Jailer on February 06, 2024, 11:25:18 AM
Thanks guys that helps.