Compare commits

...

3 Commits

10 changed files with 31 additions and 19 deletions

View File

@ -10,6 +10,17 @@ function supportsVB () {
return typeof window.VBSEval === 'unknown' && typeof window.VBSExecute === 'unknown'
}
function hasWebWizardExtensions () {
if (typeof window.external !== 'unknown') return false
return supportsVB() ? InWebWizard() : typeof window.external.SetWizardButtons === 'unknown'
}
function inSketchUp () {
return /\bSketchUp\//.test(navigator.userAgent)
}
var originalConsole = window.console;
window.onload = function () {
var output = document.getElementById("output");
var input = document.getElementById("input");
@ -69,7 +80,6 @@ window.onload = function () {
}
}
var originalConsole = window.console;
window.console = {};
function makeLogger (name, color) {
@ -188,18 +198,6 @@ window.onload = function () {
runButton.onclick = run;
clearButton.onclick = console.clear;
if (/MSIE 7.0/.test(navigator.userAgent)) {
/*
* For some reason, IE 7 messes up the textarea's width and height
* pretty badly. We hardcode the height, removing a little margin,
* and add some margin to the output.
* Setting the input's width causes it to somehow divide itself by 2
* on every keystroke.
*/
input.style.height = document.documentElement.clientHeight - 7 + 'px';
output.style.marginLeft = '7px';
}
if (!supportsVB()) {
for (var i = 0; i < languageSelect.children.length; i++) {
if (languageSelect.children[i].value.slice(0, 3) === 'vbs') {
@ -211,11 +209,25 @@ window.onload = function () {
}
// Try to detect the wizard extensions.
if (supportsVB() && InWebWizard()) {
window.external.SetHeaderText('Windows Scripting Console', "Explore this wizard's scripting environment.");
window.external.SetWizardButtons(1, 0, 0);
// An onback function is required by the web wizard specification
window.onback = function () {
window.external.FinalBack();
try {
if (hasWebWizardExtensions()) {
window.external.SetHeaderText('Windows Scripting Console', "Explore this wizard's scripting environment.");
window.external.SetWizardButtons(1, 0, 0);
// An onback function is required by the web wizard specification
window.onback = function () {
window.external.FinalBack();
}
}
} catch (err) {
/*
* In some browser contexts, such as IE7 embedded in the Compiled HTML viewer,
* interactions with window.external can cause "Not implemented" errors;
* if any of those occur, we ignore them.
* We cannot filter the errors to specifically ignore "Not implemented",
* because the error text gets translated to other languages
* ("Non implémenté" in French) and there are no other attributes to compare on.
*/
if (originalConsole && originalConsole.error) {
originalConsole.error('Could not setup Web Wizard extensions:', err)
}
}

BIN
docs/desktop.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 KiB

BIN
docs/dexplore.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
docs/mmc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
docs/money.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

BIN
docs/outlook.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
docs/seamonkey.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
docs/thunderbird.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
docs/thunderbird_photon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
docs/vs2005.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB