Skip to content

Commit

Permalink
fix(web): pred-text test page path to model
Browse files Browse the repository at this point in the history
  • Loading branch information
jahorton committed Jan 19, 2024
1 parent 998f781 commit 9917086
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions web/src/test/manual/web/prediction-mtnt/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@
kmw.addKeyboards({id:'gesture_prototyping',name:'Gesture prototyping',languages:{id:'en',name:'English'},
filename:('../keyboards/gesture_prototyping/build/gesture_prototyping.js')});

var pageRef = (window.location.protocol == 'file:')
? window.location.href.substr(0, window.location.href.lastIndexOf('/')+1)
: window.location.href;
// Ensure the URL we prefix to the page's path is the page's directory, not including
// the actual HTML page itself.
var urlIncludesIndex = window.location.href.lastIndexOf('.html') > 1;
var pageRef = (urlIncludesIndex
? window.location.href.substr(0, window.location.href.lastIndexOf('/'))
: window.location.href) + '/';

var modelStub = {'id': 'nrc.en.mtnt',
languages: ['en'],
Expand Down
9 changes: 6 additions & 3 deletions web/src/test/manual/web/prediction-ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,12 @@
kmw.addKeyboards({id:'obolo_chwerty_6351',name:'obolo_chwerty_6351',languages:{id:'en',name:'English'},
filename:('../obolo_chwerty_6351.js')});

var pageRef = (window.location.protocol == 'file:')
? window.location.href.substr(0, window.location.href.lastIndexOf('/')+1)
: window.location.href;
// Ensure the URL we prefix to the page's path is the page's directory, not including
// the actual HTML page itself.
var urlIncludesIndex = window.location.href.lastIndexOf('.html') > 1;
var pageRef = (urlIncludesIndex
? window.location.href.substr(0, window.location.href.lastIndexOf('/'))
: window.location.href) + '/';

var modelStub = {'id': 'example.en.trie',
languages: ['en'],
Expand Down

0 comments on commit 9917086

Please sign in to comment.