Changeset 674f523


Ignore:
Timestamp:
Jul 27, 2017 1:23:06 AM (3 years ago)
Author:
str4d <str4d@…>
Branches:
master
Children:
e284675e
Parents:
2bfe27d
Message:

Add JavaScript? snippet to reset dest address scroll position onblur

Fixes Chrome/Blink? disappearing text bugs in i2ptunnel and susidns.

Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • apps/i2ptunnel/jsp/editClient.jsp

    r2bfe27d r674f523  
    1515   }
    1616%>
     17
     18<%
     19    response.setHeader("Content-Security-Policy", "default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline'");
     20%>
     21
    1722<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    1823<head>
     
    3035input.default { width: 1px; height: 1px; visibility: hidden; }
    3136</style>
     37<script src="/js/resetScroll.js" type="text/javascript"></script>
    3238</head>
    3339<body id="tunnelEditPage">
     
    539545        <tr>
    540546            <td colspan="2">
    541                 <div class="displayText" title="<%=intl._t("Read Only: Local Destination (if known)")%>" tabindex="0"><%=destb64%></div>
     547                <div class="displayText" title="<%=intl._t("Read Only: Local Destination (if known)")%>" tabindex="0" onblur="resetScrollLeft(this)"><%=destb64%></div>
    542548            </td>
    543549        </tr>
  • apps/i2ptunnel/jsp/editServer.jsp

    r2bfe27d r674f523  
    1515   }
    1616%>
     17
     18<%
     19    response.setHeader("Content-Security-Policy", "default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline'");
     20%>
     21
    1722<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    1823<head>
     
    3035input.default { width: 1px; height: 1px; visibility: hidden; }
    3136</style>
     37<script src="/js/resetScroll.js" type="text/javascript"></script>
    3238</head>
    3339<body id="tunnelEditPage">
     
    231237        <tr>
    232238            <td>
    233                 <div class="displayText" title="<%=intl._t("Read Only: Local Destination (if known)")%>" tabindex="0"><%=editBean.getDestinationBase64(curTunnel)%></div>
     239                <div class="displayText" title="<%=intl._t("Read Only: Local Destination (if known)")%>" tabindex="0" onblur="resetScrollLeft(this)"><%=editBean.getDestinationBase64(curTunnel)%></div>
    234240            </td>
    235241            <td>
     
    815821        <tr>
    816822            <td colspan="2">
    817                 <div class="displayText" title="<%=intl._t("Read Only: Alternate Local Destination")%>"><%=ab64%></div>
     823                <div class="displayText" title="<%=intl._t("Read Only: Alternate Local Destination")%>" onblur="resetScrollLeft(this)"><%=ab64%></div>
    818824            </td>
    819825        </tr>
  • apps/susidns/src/jsp/addressbook.jsp

    r2bfe27d r674f523  
    2929
    3030    response.setHeader("X-Frame-Options", "SAMEORIGIN");
    31     response.setHeader("Content-Security-Policy", "default-src 'self'");
     31    response.setHeader("Content-Security-Policy", "default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline'");
    3232    response.setHeader("X-XSS-Protection", "1; mode=block");
    3333    response.setHeader("X-Content-Type-Options", "nosniff");
     
    5252<title>${book.book} <%=intl._t("address book")%> - susidns</title>
    5353<link rel="stylesheet" type="text/css" href="<%=book.getTheme()%>susidns.css?<%=net.i2p.CoreVersion.VERSION%>">
     54<script src="/js/resetScroll.js" type="text/javascript"></script>
    5455</head>
    5556<body>
     
    185186<td class="helper"><a href="http://${addr.name}/?i2paddresshelper=${addr.destination}" target="_blank" title="<%=intl._t("Helper link to share host address with option to add to addressbook")%>">link</a></td>
    186187<td class="names"><span class="addrhlpr"><a href="details?h=${addr.name}&amp;book=${book.book}" title="<%=intl._t("More information on this entry")%>"><%=intl._t("details")%></a></span></td>
    187 <td class="destinations"><div class="destaddress" name="dest_${addr.name}" width="200px" tabindex="0">${addr.destination}</div></td>
     188<td class="destinations"><div class="destaddress" name="dest_${addr.name}" width="200px" tabindex="0" onblur="resetScrollLeft(this)">${addr.destination}</div></td>
    188189
    189190<c:if test="${book.validBook}">
  • history.txt

    r2bfe27d r674f523  
    112017-07-26 str4d
    22 * Console:
     3   - Add JavaScript snippet to reset dest address scroll position onblur (fixes
     4     Chrome/Blink disappearing text bugs in i2ptunnel and susidns)
    35   - /debug:
    46     - Add container divs and styling markup
Note: See TracChangeset for help on using the changeset viewer.