PageSourceSearch

https://framagames.org/0hh1/js/index.js

js framagames.org collected 2026-10-08 06:45:59 UTC 2,022 bytes, 60 lines download raw bytes

1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements.  See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership.  The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License.  You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied.  See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19var app = {
20    fontsLoaded: false,
21    deviceReady: false,
22    started: false,
23
24    // Application Constructor
25    initialize: function() {
26        this.bindEvents();
27    },
28    // Bind Event Listeners
29    //
30    // Bind any events that are required on startup. Common events are:
31    // 'load', 'deviceready', 'offline', and 'online'.
32    bindEvents: function() {
33        document.addEventListener('deviceready', this.onDeviceReady, false);
34    },
35    // deviceready Event Handler
36    //
37    // The scope of 'this' is the event. In order to call the 'receivedEvent'
38    // function, we must explicitly call 'app.receivedEvent(...);'
39    onDeviceReady: function() {
40        setTimeout(function(){navigator.splashscreen.hide();}, 100);
41        app.deviceReady = true;
42        app.startTheGameIfWeCan();
43    },
44    // Update DOM on a Received Event
45    receivedEvent: function(id) {
46        //console.log('Received Event: ' + id);
47    },
48    fontsLoaded: function() {
49        app.fontsLoaded = true;
50        app.startTheGameIfWeCan();
51    },
52    startTheGameIfWeCan: function() {
53        if (app.started) return false;
54        app.started = true;
55        Game.init();
56        Game.start();
57    }
58};
59
60app.initialize();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.