How to determine if a user is on the main page using javascript / jquery in Osclass script declarations.
I know that a similar function is available in osclass php directories, i.e. osc_is_home_page (), but I need something similar in javascript / jquery.
enqueue script only if its main page. Its much more useful.
if(osc_is_home_page()){ osc_register_script('script_id', 'scriptUrl', 'dependency'); osc_enqueue_script('script_id'); }
Source: https://habr.com/ru/post/1614055/More articles:Exact file search does not work - powershellWhy is replacement not a good idea in zookeeper and kafka? - apache-zookeeperGraph aspect and search differ from search result - marklogicIOS / Objective-C: Get Number from JSON - iosВнедрить тип очереди в F # - typesHow to set validateInterval cookie in ASP.NET Core? - asp.net-coredifference between elixir phoenix and caramel elixir - elixirjava.io.IOException: not data file - hadoopWhy doesn't gcc compile this code sequentially? - cThe main pyqt window continues to crash after receiving data from the stream - pythonAll Articles