forked from 0x2620/oxjs
support loading Ox.js?\d+ to get new version
This commit is contained in:
parent
541af0917a
commit
9a2c7c7239
2 changed files with 4 additions and 4 deletions
|
|
@ -36,8 +36,8 @@
|
|||
function getPath() {
|
||||
var i, path, scripts = document.getElementsByTagName('script');
|
||||
for (i = 0; i < scripts.length; i++) {
|
||||
if (/Ox\.js$/.test(scripts[i].src)) {
|
||||
path = scripts[i].src.replace(/Ox\.js$/, '');
|
||||
if (/Ox\.js(\?\d+|)$/.test(scripts[i].src)) {
|
||||
path = scripts[i].src.replace(/Ox\.js(\?\d+|)$/, '');
|
||||
}
|
||||
}
|
||||
return path;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue