123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- <!DOCTYPE html>
- <html>
- <head>
- <style>
- html {
- overflow: hidden;
- resize: none;
- }
- body {
- font-size: 16px;
- margin: 0;
- padding: 0;
- background-color: rgba(255, 255, 255, 0.8);
- }
- #message {
- padding: 10px 16px;
- background: #fff;
- border-radius: 2px;
- box-shadow: 0 3px 6px -4px rgb(0 0 0 / 12%),
- 0 6px 16px 0 rgb(0 0 0 / 8%), 0 9px 28px 8px rgb(0 0 0 / 5%);
- pointer-events: all;
- text-align: center;
- color: rgba(0, 0, 0, 0.85);
- font-size: 14px;
- font-variant: tabular-nums;
- line-height: 1.5715;
- list-style: none;
- font-feature-settings: 'tnum';
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
- 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji',
- 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
- -webkit-text-size-adjust: 100%;
- word-break: break-all;
- }
- #message .anticon {
- position: relative;
- top: 1px;
- margin-right: 8px;
- font-size: 16px;
- }
- .message-success .anticon {
- color: #52c41a;
- }
- .message-warning .anticon {
- color: #faad14;
- }
- .message-error .anticon {
- color: #ff4d4f;
- }
- .anticon {
- display: inline-block;
- color: inherit;
- font-style: normal;
- line-height: 0;
- text-align: center;
- text-transform: none;
- vertical-align: -0.125em;
- text-rendering: optimizeLegibility;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- }
- </style>
- <meta charset="utf-8" />
- <script src="../js/path.js"></script>
- <script src="base.js"></script>
- <script type="text/javascript">
- function createIcon(type) {
- var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg')
- svg.setAttribute('viewBox', '64 64 896 896')
- svg.setAttribute('width', '1em')
- svg.setAttribute('height', '1em')
- svg.setAttribute('fill', 'currentColor')
- var path = document.createElementNS(
- 'http://www.w3.org/2000/svg',
- 'path'
- )
- switch (type) {
- case 'success':
- path.setAttribute(
- 'd',
- 'M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z'
- )
- break
- case 'error':
- path.setAttribute(
- 'd',
- 'M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z'
- )
- break
- case 'warning':
- path.setAttribute(
- 'd',
- 'M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z'
- )
- break
- }
- svg.appendChild(path)
- return svg
- }
- function writemessage() {
- var params = getQueryParams()
- var container = document.getElementById('message')
- if (!!params.type && params.type !== 'default') {
- var span = document.createElement('span')
- span.className = 'anticon'
- span.appendChild(createIcon(params.type))
- container.className = container.className + ' message-' + params.type
- container.appendChild(span)
- }
- const msg = document.createElement('span')
- msg.innerText = params.message
- container.appendChild(msg)
- var duration = Number(params.duration)
- if (!!duration) {
- setTimeout(() => {
- window.close()
- }, duration * 1000)
- }
- }
- function init() {
- StopEscKeyKown()
- writemessage()
- }
- </script>
- </head>
- <body onload="init()">
- <div id="message"></div>
- </body>
- </html>
|