GithubHelp home page GithubHelp logo

Comments (4)

phrrngtn avatar phrrngtn commented on September 22, 2024

some nice-looking code in https://rickosborne.org/html5-dbstorage-sudoku/ ... much better than any other JavaScript I have seen.

http://www.slideshare.net/casden/inbrowser-storage-and-me

from flaming-octo-happiness.

phrrngtn avatar phrrngtn commented on September 22, 2024

Found a site that generated one for me. Metaprogramming at its best!

http://extensionizr.com/!#{"modules":["hidden-mode","with-bg","with-persistent-bg","no-options","no-override"],"boolean_perms":[],"match_ptrns":[]}

Added it to whitelist. Packed it from Chrome. Dragged and dropped the packed extension onto the chrome://extensions page

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\ExtensionInstallWhitelist

Was unable to get the --load-extension command-line switch to work for me.

from flaming-octo-happiness.

phrrngtn avatar phrrngtn commented on September 22, 2024

Some JS snippets that demonstrate opening a database and running some transactions against it.

    /*
     * Constructor code begins here.
     */
    if(!window.openDatabase) {
        alert("Your browser does not appear to support the openDatabase call from the HTML5 Database Storage API.");
        return null;
    } // if not openDatabase
    db = openDatabase(dbName, DB_VERSION, DB_TITLE, DB_BYTES);
    if(!db) {
        alert("The browser rejected the request to open the database.");
        return null;
    } //
    /**
     * Return the values that are written (known) on the game board.
     * Rows and columns are converted to 0-base (0-8) from the 1-base (1-9) stored in the database.
     * 
     * @param {Function} doneCallback   Next step once the values have been fetched.
     */
    function getKnowns (doneCallback) {
        db.transaction(function(tx) {
            tx.executeSql("SELECT row, col, box, term FROM rs_cells;", [], function(tx, r) {
                var knowns = [];
                for(var i = 0; i < r.rows.length; i++) {
                    var rec = r.rows.item(i);
                    knowns.push({ row: rec.row - 1, col: rec.col - 1, box: rec.box, term: rec.term });
                } // for i
                doneCallback(knowns);
            }, sqlFailed);
        }); // transaction
    } // getKnowns

from flaming-octo-happiness.

phrrngtn avatar phrrngtn commented on September 22, 2024

This may be less relevant now that an embedded browser in an Excel CTP seems feasible.

from flaming-octo-happiness.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.