Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Get the base URL of the forum in your JS
This discussion has been closed.
Comments
both cannot coexist.
even If i rename Vanilla.webRoot to something else it still causes problems
to get path to a file
var JQmedia = new PathFinder(); JQmedia .webRoot = JQmedia.getRootPath('script', 'src', 'js/global.js'); //in case the forum is using a js merger ;-) if(!JQmedia .webRoot) { JQmedia .webRoot = JQmedia.getRootPath('script', 'src', /js\/packer\.php.*$/); }
now thickbox and jQmedia are working together.
if (!window.Vanilla){ var Vanilla = new PathFinder(); Vanilla.webRoot = Vanilla.getRootPath('script', 'src', 'js/global.js') || Vanilla.getRootPath('script', 'src', /js\/packer\.php.*$/) ; Vanilla.styleUrl = Vanilla.getRootPath('link', 'href', 'vanilla.css') || Vanilla.getRootPath('link', 'href', /packer\.php.*$/); Vanilla.baseURL = Vanilla.params.httpMethod + Vanilla.params.domain + Vanilla.webRoot; }
One that does not depend on the presence of a <script tag pointing to 'js'global.js
See this post getRootPath function in global.js causes problems (Mark?) # 1