File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 1
1
import drawSkin3D from './namemc-skins' ;
2
2
3
+ function findGetParameter ( parameterName ) {
4
+ let result = null ;
5
+ let tmp = [ ] ;
6
+ const items = window . location . search . substr ( 1 ) . split ( '&' ) ;
7
+ for ( let index = 0 ; index < items . length ; index += 1 ) {
8
+ tmp = items [ index ] . split ( '=' ) ;
9
+ if ( tmp [ 0 ] === parameterName ) result = decodeURIComponent ( tmp [ 1 ] ) ;
10
+ }
11
+ return result ;
12
+ }
13
+
3
14
const canvas = document . getElementById ( 'skin' ) ;
4
- const url = new URL ( window . location . href ) ;
5
- const uuid = url . searchParams . get ( 'uuid' ) ;
15
+ const uuid = findGetParameter ( 'uuid' ) ;
6
16
7
17
if ( uuid && uuid . length === 32 ) {
8
18
const w = Math . max ( document . documentElement . clientWidth , window . innerWidth || 0 ) ;
Original file line number Diff line number Diff line change 15
15
<div class =" panel panel-default" >
16
16
<div class =" panel-body" >
17
17
<img v-if =" !isCanvasSupported" :src =" `/static/data/${uuid}/body.png`" :alt =" `${player.data.playername}'s model`" class =" img-rounded" >
18
- <iframe v-if =" isCanvasSupported" :src =" `/static/skin/index.html?uuid=${uuid}`" class =" skin" />
18
+ <iframe v-if =" isCanvasSupported" :src =" `/static/skin/index.html?uuid=${uuid}`" class =" skin" scrolling = " no " />
19
19
</div >
20
20
</div >
21
21
</div >
You can’t perform that action at this time.
0 commit comments