mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 06:00:56 -05:00
Fix prepro.js for Opera by avoiding 'self' as variable name.
This commit is contained in:
parent
5f0da04daf
commit
4106cc3621
1 changed files with 3 additions and 3 deletions
|
@ -21,8 +21,8 @@ if (!window.include) {
|
|||
// scripts from loading straight away.
|
||||
var scripts = document.getElementsByTagName('script');
|
||||
var script = scripts[scripts.length - 1];
|
||||
var self = script.getAttribute('src');
|
||||
var root = self.match(/^(.*\/)/)[1];
|
||||
var src = script.getAttribute('src');
|
||||
var root = src.match(/^(.*\/)/)[1];
|
||||
|
||||
window.include = function(url) {
|
||||
url = root + url;
|
||||
|
@ -31,7 +31,7 @@ if (!window.include) {
|
|||
// executing straight away, and delaying it until right before the
|
||||
// script at 'url' is loaded.
|
||||
document.write([
|
||||
'<script type="text/javascript" src="', self, '"></script>',
|
||||
'<script type="text/javascript" src="', src, '"></script>',
|
||||
// Set newRoot, so include() from 'url' load from the right place
|
||||
'<script type="text/javascript">root = "', newRoot, '";</script>',
|
||||
// Load the actual script
|
||||
|
|
Loading…
Reference in a new issue