Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE support #2

Open
zlatinz opened this issue Aug 6, 2014 · 6 comments
Open

IE support #2

zlatinz opened this issue Aug 6, 2014 · 6 comments

Comments

@zlatinz
Copy link

zlatinz commented Aug 6, 2014

Check res://ieframe.dll/DNSERROR.htm

@will
Copy link
Owner

will commented Aug 6, 2014

I don't have IE :(

If you can reproduce the page in a single html file with the images as data-urls I can put it in though.

@zlatinz
Copy link
Author

zlatinz commented Sep 6, 2014

<head>
    <link rel="stylesheet" type="text/css" href="NewErrorPageTemplate.css" >

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>This page can&rsquo;t be displayed</title>

    <script src="errorPageStrings.js" language="javascript" type="text/javascript">
    </script>
    <script src="httpErrorPagesScripts.js" language="javascript" type="text/javascript">
    </script>
</head>

<body onLoad="javascript:getInfo();">
    <div id="contentContainer" class="mainContent">
        <div id="mainTitle" class="title">This page can&rsquo;t be displayed</div>
        <div class="taskSection" id="taskSection">
            <ul id="cantDisplayTasks" class="tasks">
                <li id="task1-1">Make sure the web address <span id="webpage" class="webpageURL"></span>is correct.</li>
                <li id="task1-2">Look for the page with your search engine.</li>
                <li id="task1-3">Refresh the page in a few minutes.</li>
            </ul>
            <ul id="notConnectedTasks" class="tasks" style="display:none">
                <li id="task2-1">Check that all network cables are plugged in.</li>
                <li id="task2-2">Verify that airplane mode is turned off.</li>
                <li id="task2-3">Make sure your wireless switch is turned on.</li>
                <li id="task2-4">See if you can connect to mobile broadband.</li>
                <li id="task2-5">Restart your router.</li>
            </ul>
        </div>
        <div><button id="diagnose" class="diagnoseButton" onclick="javascript:diagnoseConnectionAndRefresh(); return false;">Fix connection problems</button></div>
    </div>
</body>

@zlatinz
Copy link
Author

zlatinz commented Sep 6, 2014

// res://ieframe.dll/errorPageStrings.js
//Split out for localization.
var L_GOBACK_TEXT = "Go back to the previous page.";
var L_REFRESH_TEXT = "Refresh the page.";
var L_MOREINFO_TEXT = "More information";
var L_OFFLINE_USERS_TEXT = "For offline users";
var L_RELOAD_TEXT = "Retype the address.";
var L_HIDE_HOTKEYS_TEXT = "Hide tab shortcuts";
var L_SHOW_HOTKEYS_TEXT = "Show more tab shortcuts";
var L_CONNECTION_OFF_TEXT = "You are not connected to the Internet. Check your Internet connection.";
var L_CONNECTION_ON_TEXT = "It appears you are connected to the Internet, but you might want to try to reconnect to the Internet.";

//used by invalidcert.js
var L_CertUnknownCA_TEXT = "The security certificate presented by this website was not issued by a trusted certificate authority.";
var L_CertExpired_TEXT = "The security certificate presented by this website has expired or is not yet valid.";
var L_CertCNMismatch_TEXT = "The security certificate presented by this website was issued for a different website's address.";
var L_CertRevoked_TEXT = "This organization's certificate has been revoked.";
var L_CertSigFailed_TEXT = "The security certificate presented by this website is not secure.";

var L_PhishingThreat_TEXT = "Phishing threat: This is a phishing website that impersonates a trusted website to trick you into revealing personal or financial information.";
var L_MalwareThreat_TEXT = "Malicious software threat: This site contains links to viruses or other software programs that can reveal personal information stored or typed on your computer to malicious persons.";

var L_TopFrameUnsafe_TEXT = "This website has been reported as unsafe";
var L_ContentUnsafe_TEXT = "Content on this website has been reported as unsafe";
var L_Content_TEXT = "Hosted by: ";

var L_ACR_Title_TEXT = "We were unable to return you to %s.";
var L_ACR_TitleFallback_TEXT = "We were unable to return you to the page you were viewing.";
var L_ACR_ReturnTo_TEXT = "Try to return to %s";
var L_ACR_ReturnToFallback_TEXT = "Try to return to the page you were viewing";
var L_ACR_GoHome_TEXT = "Go to your home page";

//used by new dnserror.htm
var L_INTERNET_NOT_CONNECTED_TEXT = "You\u2019re not connected to a network";
var L_INTERNET_CONNECTED_TEXT = "This page can\u2019t be displayed";

var L_TLS_SSL_TEXT = "Make sure TLS and SSL protocols are enabled. Go to Tools > Internet Options > Advanced > Settings > Security";

// Used by IM DNS error page
var L_THIS_PAGE_CANT_BE_DISPLAYED_TEXT = "This page can\u2019t be displayed";
var L_YOU_ARE_NOT_CONNECTED_TEXT = "You\u2019re not connected";

// Used by IExtensionValidation error page
var L_ActiveXUnsafe_TEXT = "%s blocked this website";
var L_ActiveXUnsafe_Frame_TEXT = "%s blocked content on this website";
var L_ActiveXUnsafe_Explain_TEXT = "%s blocked this site because it might contain threats to your PC or your privacy.";
var L_ActiveXUnsafe_Hosted_TEXT = "Hosted by: %s";

@zlatinz
Copy link
Author

zlatinz commented Sep 6, 2014

// res://ieframe.dll/httpErrorPagesScripts.js
function isExternalUrlSafeForNavigation(urlStr)
{
var regEx = new RegExp("^(http(s?)|ftp|file)://", "i");
return regEx.exec(urlStr);
}
function clickRefresh()
{
var location = window.location.href;
var poundIndex = location.indexOf('#');
if (poundIndex != -1 && poundIndex+1 < location.length && isExternalUrlSafeForNavigation(location.substring(poundIndex+1)))
{
window.location.replace(location.substring(poundIndex+1));
}
}
function navCancelInit()
{
var location = window.location.href;
var poundIndex = location.indexOf('#');
if (poundIndex != -1 && poundIndex+1 < location.length && isExternalUrlSafeForNavigation(location.substring(poundIndex+1)))
{
var bElement = document.createElement("A");
bElement.innerText = L_REFRESH_TEXT;
bElement.href = 'javascript:clickRefresh()';
navCancelContainer.appendChild(bElement);
}
else
{
var textNode = document.createTextNode(L_RELOAD_TEXT);
navCancelContainer.appendChild(textNode);
}
}
function expandCollapse(elem, changeImage)
{
if (document.getElementById)
{
ecBlock = document.getElementById(elem);
if (ecBlock != undefined && ecBlock != null)
{
if (changeImage)
{
elemImage = document.getElementById(elem + "Image");
}
if (!changeImage || (elemImage != undefined && elemImage != null))
{
if (ecBlock.currentStyle.display == "none" || ecBlock.currentStyle.display == null || ecBlock.currentStyle.display == "")
{
ecBlock.style.display = "block";
if (changeImage)
{
elemImage.src = "up.png";
}
}
else if (ecBlock.currentStyle.display == "block")
{
ecBlock.style.display = "none";
if (changeImage)
{
elemImage.src = "down.png";
}
}
else
{
ecBlock.style.display = "block";
if (changeImage)
{
elemImage.src = "up.png";
}
}
}
}
}
}
function initHomepage()
{
DocURL=document.location.href;
var poundIndex = DocURL.indexOf('#');
if (poundIndex != -1 && poundIndex+1 < location.length && isExternalUrlSafeForNavigation(location.substring(poundIndex+1)))
{
protocolIndex=DocURL.indexOf("://", 4);
serverIndex=DocURL.indexOf("/", protocolIndex + 3);
BeginURL=DocURL.indexOf("#",1) + 1;
urlresult=DocURL.substring(BeginURL, serverIndex);
if (protocolIndex - BeginURL > 7)
urlresult="";
displayresult=DocURL.substring(protocolIndex + 3, serverIndex);
}
else
{
displayresult = "";
urlresult = "";
}
var aElement = document.createElement("A");
aElement.innerText = displayresult;
aElement.href = urlresult;
homepageContainer.appendChild(aElement);
}
function initConnectionStatus()
{
if (navigator.onLine)
{
checkConnection.innerText = L_CONNECTION_ON_TEXT;
}
else
{
checkConnection.innerText = L_CONNECTION_OFF_TEXT;
}
}
function initGoBack()
{
if (history.length < 1)
{
var textNode = document.createTextNode(L_GOBACK_TEXT);
goBackContainer.appendChild(textNode);
}
else
{
var bElement = document.createElement("A");
bElement.innerText = L_GOBACK_TEXT ;
bElement.href = "javascript:history.back();";
goBackContainer.appendChild(bElement);
}
}
function initMoreInfo(infoBlockID)
{
var bElement = document.createElement("A");
bElement.innerText = L_MOREINFO_TEXT;
bElement.href = "javascript:expandCollapse('infoBlockID', true);";
moreInfoContainer.appendChild(bElement);
}
function initOfflineUser(offlineUserID)
{
var bElement = document.createElement("A");
bElement.innerText = L_OFFLINE_USERS_TEXT;
bElement.href = "javascript:expandCollapse('offlineUserID', true);";
offlineUserContainer.appendChild(bElement);
}
function initUnframeContent()
{
var location = window.location.href;
var poundIndex = location.indexOf('#');
if (poundIndex != -1 && poundIndex+1 < location.length && isExternalUrlSafeForNavigation(location.substring(poundIndex+1)))
{
document.getElementById("whatToDoIntro").style.display="";
document.getElementById("whatToDoBody").style.display="";
}
}
function removeNoScriptElements() {
var noScriptElements = document.getElementsByTagName("noscript");
for (var i = noScriptElements.length - 1; i >= 0; i--)
{
var bElement = noScriptElements[i];
if (bElement !== undefined && bElement !== null)
{
bElement.removeNode(true);
}
}
}
function makeNewWindow()
{
var location = window.location.href;
var poundIndex = location.indexOf('#');
if (poundIndex != -1 && poundIndex+1 < location.length && isExternalUrlSafeForNavigation(location.substring(poundIndex+1)))
{
window.open(location.substring(poundIndex+1));
}
}
function setTabInfo(tabInfoBlockID)
{
var bPrevElement = document.getElementById("tabInfoTextID");
var bPrevImage = document.getElementById("tabInfoBlockIDImage");
if (bPrevElement != null)
{
tabInfoContainer.removeChild(bPrevElement);
}
if (bPrevImage != null)
{
tabImageContainer.removeChild(bPrevImage);
}
var bElement = document.createElement("A");
var bImageElement = document.createElement("IMG");
var ecBlock = document.getElementById(tabInfoBlockID);
if ((ecBlock != undefined && ecBlock != null) &&
(ecBlock.currentStyle.display == "none" || ecBlock.currentStyle.display == null || ecBlock.currentStyle.display == ""))
{
bElement.innerText = L_SHOW_HOTKEYS_TEXT;
bImageElement.alt = L_SHOW_HOTKEYS_TEXT;
bImageElement.src="down.png";
}
else
{
bElement.innerText = L_HIDE_HOTKEYS_TEXT;
bImageElement.alt = L_HIDE_HOTKEYS_TEXT;
bImageElement.src="up.png";
}
bElement.id = "tabInfoTextID";
bElement.href = "javascript:expandCollapse('tabInfoBlockID', false); setTabInfo('tabInfoBlockID');";
bImageElement.id="tabInfoBlockIDImage";
bImageElement.border="0";
bImageElement.className="actionIcon";
tabInfoContainer.appendChild(bElement);
tabImageContainer.appendChild(bImageElement);
}
function launchInternetOptions()
{
window.external.msLaunchInternetOptions();
}
function diagnoseConnection()
{
window.external.DiagnoseConnection();
}
function diagnoseConnectionAndRefresh()
{
window.external.DiagnoseConnection();
if (navigator.onLine)
{
clickRefresh();
}
}
function getInfo()
{
checkConnection();
if (document.addEventListener)
{
addEventListener("offline", reportConnectionEvent, false);
}
else
{
attachEvent("onoffline", reportConnectionEvent);
}
document.body.ononline = reportConnectionEvent;
document.body.onoffline = reportConnectionEvent;
}
function checkConnection()
{
var newHeading = document.getElementById("mainTitle");
var notConnectedTasks = document.getElementById("notConnectedTasks");
var cantDisplayTasks = document.getElementById("cantDisplayTasks");
if (navigator.onLine)
{
document.title = L_INTERNET_CONNECTED_TEXT;
newHeading.textContent = L_INTERNET_CONNECTED_TEXT;
addURL();
notConnectedTasks.style.display = "none";
cantDisplayTasks.style.display = "";
}
else
{
document.title = L_INTERNET_NOT_CONNECTED_TEXT;
newHeading.textContent = L_INTERNET_NOT_CONNECTED_TEXT;
notConnectedTasks.style.display = "";
cantDisplayTasks.style.display = "none";
}
}
function reportConnectionEvent(e)
{
if (!e) e = window.event;
if ('online' == e.type)
{
setTimeout ( "clickRefresh()", 1000 );
}
else if ('offline' == e.type)
{
checkConnection();
}
else
{
checkConnection();
}
}
function addURL()
{
var urlResult = "";
var DocURL = document.location.href;
var urlPlaceholder = document.getElementById("webpage");
var beginIndex = DocURL.indexOf('#') + 1;
if (DocURL.indexOf("file://", beginIndex) == -1)
{
var protocolEndIndex = DocURL.indexOf("://", beginIndex);
var endIndex=DocURL.indexOf("/", protocolEndIndex + 3);
urlResult = DocURL.substring(beginIndex, endIndex);
}
urlPlaceholder.innerText = urlResult + " ";
}
function addDomainName()
{
var domainNamePlaceholder = document.getElementById("DomainName");
domainNamePlaceholder.innerText = findValue("DomainName=") + " ";
}
function addProxyDetail()
{
var proxyDetailPlaceholder = document.getElementById("ProxyDetail");
proxyDetailPlaceholder.innerText = findValue("ProxyDetail=");
}
function findValue(key)
{
var value = '';
DocQuery = document.location.search;
BeginString = DocQuery.indexOf(key);
if (BeginString > 0)
{
BeginString += key.length;
EndString = Math.max(0, Math.min(DocQuery.indexOf("&", BeginString), DocQuery.indexOf("#", BeginString)));
if (EndString > 0)
{
value = DocQuery.substring(BeginString, EndString);
}
else
{
value = DocQuery.substring(BeginString);
}
}
return value;
}
function isHTTPS(cantDisplayTasks)
{
var DocURL = document.location.href;
var poundIndex = DocURL.indexOf('#');
var protocolIndex = DocURL.indexOf("https://", poundIndex);
if (protocolIndex>poundIndex)
{
var bElement = document.createElement("li");
bElement.textContent = L_TLS_SSL_TEXT;
cantDisplayTasks.appendChild(bElement);
}
}

@zlatinz
Copy link
Author

zlatinz commented Sep 6, 2014

/* NewErrorPageTemplate.css - extracted with http://sourceforge.net/projects/resourcextract/ as res://ieframe.dll/NewErrorPageTemplate.css cannot be seen in IE - produces "Failed to open res://ieframe.dll/NewErrorPageTemplate.css" */

body
{
background-repeat: repeat-x;
background-color: white;
font-family: "Segoe UI", "verdana", "arial";
margin: 0em;
color: #575757;
}

.mainContent
{
margin-top:80px;
width: 700px;
margin-left: 120px;
margin-right: 120px;
}

.title
{
color: #2778ec;
font-size: 38pt;
font-weight: 300;
vertical-align:bottom;
margin-bottom: 20px;
font-family: "Segoe UI", "verdana";
position: relative;
}

.errorExplanation
{
color: #000000;
font-size: 12pt;
font-family: "Segoe UI", "verdana", "arial";
text-decoration: none;
}

.taskSection
{
margin-top: 20px;
margin-bottom: 40px;
position: relative;
}

.tasks
{
color: #000000;
font-family: "Segoe UI", "verdana";
font-weight:200;
font-size: 12pt;
padding-top: 5px;
}

li
{
margin-top: 8px;
}

.diagnoseButton
{
outline: none;
font-size: 9pt;
}

.launchInternetOptionsButton
{
outline: none;
font-size: 9pt;
}

.webpageURL
{
direction:ltr;
}

.hidden
{
display:none;
}

a
{
color: #0066cc;
font-family: "Segoe UI", "verdana", "arial";
font-size: 11pt;
text-decoration: none;
}

a:hover
{
text-decoration: underline;
}

@zlatinz
Copy link
Author

zlatinz commented Sep 6, 2014

Above contents are for IE 11.0.9600.17239

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants