From aef7986e5d30d8bdc15492e456e11006732a2f36 Mon Sep 17 00:00:00 2001 From: fthvgb1 Date: Thu, 23 Jan 2020 12:39:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BF=AE=E6=94=B9=EF=BC=8C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=9F=B3=E9=A2=91=E6=92=AD=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- translate/translate-dictionary.js | 342 +++++++++++++++++++++++++++++- 1 file changed, 337 insertions(+), 5 deletions(-) diff --git a/translate/translate-dictionary.js b/translate/translate-dictionary.js index 2ed843f..3b6426b 100644 --- a/translate/translate-dictionary.js +++ b/translate/translate-dictionary.js @@ -47,14 +47,245 @@ tr-audio{display:block;margin-bottom:5px} tr-audio a{margin-right:1em;font-size:80%} tr-audio a:last-of-type{margin-right:auto} - tr-content{display:none;width:${trContentWidth}px;height:auto;overflow-x:hidden;overflow-y:scroll;background:white;padding:2px 8px;margin-top:5px;box-sizing:content-box;font-family:"Helvetica Neue","Helvetica","Arial","sans-serif";font-size:${fontSize}px;font-weight:normal;line-height:normal;-webkit-font-smoothing:auto;font-smoothing:auto;text-rendering:auto} + tr-content{display:none;width:auto;max-height:${trContentHeight};overflow-y: scroll;background:white;padding:2px 8px;margin-top:5px;box-sizing:content-box;font-family:"Helvetica Neue","Helvetica","Arial","sans-serif";font-size:${fontSize}px;font-weight:normal;line-height:normal;-webkit-font-smoothing:auto;font-smoothing:auto;text-rendering:auto} tr-engine~tr-engine{margin-top:1em} tr-engine .title{color:#00c;display:inline-block;font-weight:bold} tr-engine .title:hover{text-decoration:none} /*各引擎样式*/ + .word-details { + position: relative +} + +.word-details-header { + padding: 40px 30px +} + +.word-details-header>p { + line-height: 20px; + margin: 0 0 20px +} + +.word-details-header>p>span { + color: #bac +} + +.word-details .redirection { + color: #fff; + line-height: 20px; + margin: 0 0 20px; + opacity: .8 +} + +.word-details-tab { + cursor: pointer; + display: inline-block; + margin: 0 15px 15px 0; + height: 60px; + border-radius: 5px; + padding: 0 20px; + background: #f5f8ff +} + +.word-details-tab h2 { + font-size: 18px; + line-height: 30px; + height: 35px; + margin: 0; + font-weight: 400; + display: inline-block +} + +.word-details-tab-active { + color: #fff; + background-color: #abc +} + +.word-details-tab .pronounces { + display: inline-block; + line-height: 60px; + height: 60px; + vertical-align: top; + margin-left: 20px +} + +.word-details-pane { + display: none +} + +.word-details-pane:first-child { + display: block +} + +.word-details-pane-header { + padding: 23px 32px; + background-image: -webkit-linear-gradient(276deg,#030303,#f90); + background-image: -o-linear-gradient(276deg,#030303,#f90); + background-image: linear-gradient(276deg,#030303,#f90); + border-top-left-radius: 5px; + border-top-right-radius: 5px; + color: #fff +} + +.word-details-pane-header-multi { + border-top-left-radius: 0; + border-top-right-radius: 0 +} + +.word-details-pane-header .word-text { + margin-bottom: 10px +} + +.word-details-pane-header .word-text .add-to-scb-loading { + background: url(img/loading-289f3.png) no-repeat 0 0/cover; + -webkit-animation: xd-loading .6s steps(8) infinite both; + animation: xd-loading .6s steps(8) infinite both +} + +.word-details-pane-header .word-text .add-to-scb-success { + background: url(data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIy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UgiRws8aWAWzwKCnmqABbsA1Qjx7CnGa6HVu5uJrgBLoCYTo0WuNUASjKQvaPhanxCerVDAOd0F/hBU18d3xJdjHEijrIrYG8iANEpQ0bau5iM5KFUxzts35eGIB3cNPp9d0OelhyBRc4og1SXhBTI7okhTBpHRxqoElKHQclMES9WGrR0qGYIuTs7qA2ClwR31aYJGT05YMwWUmZJ4KOgRHLmJJzj8wfq/ggGkryxBcZ0KSClBwHJ+AmEPsDHjkPP5N6uu0ugzBHSbkBvhi2s6o6HnwwnlB1+mfSTDnOioET4BLTn29Am9M2wfIOO6+EsG8lCDfoC9+GdXewTKT2z9SQsb0ssEcZ0AfbIFzF58WWAG3HN/B2IrLGsnbU+Z8EyxwKoeuqqyJDBzHtP0JzLmUOteBg/2gnVQ0NG+DaT9DczWgzZWi6OTHY7QTmvzsBS1Y9vQyqG2vIic1gp/AO0SPurFY9JjIB7dEUrQBE9giNKZY+MjL/G8BBgDu7CBuz18G6wAAAABJRU5ErkJggg==) 0 0/contain +} + +.word-details-pane-header .word-text .word-info { + margin-bottom: 20px +} + +.word-details-pane-header .word-text h2 { + font-size: 18px; + line-height: 0; + margin: 0; + font-weight: 400; + display: inline-block +} + +.word-details-pane-header .word-text a,.word-details-pane-header .word-text button { + display: inline-block; + width: 20px; + height: 20px; + line-height: 50px; + margin-left: 30px; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABGdBTUEAALGPC/xhBQAAAp9JREFUWAntWbFOAkEQBbHESipCbOj8DAobEyz9ATqi0UQ/xsBPWNCY+AW2WtIZPkApMFHxvePOm5u7PQbclZAwyYSZ2zcz7/aG2727SgUyn89r0FvoE/QDGlpYg7VYs0YOZmEA9BG6KWFtM+k9nNk1tGM+Q/9A1iYHk5DwuQkZFmTngMsxU71wGJZb9J9pqJoza80qAyW4CpF+KHvdumyJrZId4dCXazfDuxlWM7CvfKerb0NOoGPA1+1y18OOCfZ2eOtm2NzDvnpQTPWLsM3mxvYSZoYKuHUtsXWEzT1svQ+X9TpytHCFz6Cn0Da0CaVMoGPoCHqPHK/4LRYSkVKMijbdEua0i+IBbkIH0E9nYDpADLHJyWRTpriFlR1NPY1z+WnEwgKuC31z4UuOM6ar8/ERPyM5QHwgAypxZDxgl9CvEviyIcZeyJxmwpkgg4NCnNkiss84fgU9htZjpc1jHNPCHOlM61EDl6UQ5GTP6jbgy5M+1Hln4liM0S9zmGvR0zAyspSNAYCE/NNIIYGODJWDtNVYB4c06UGEKQuUSaw28rWg+m7Q1/HL6mKcV0MKc7a89zCS6kLsy1wbSCa0C06I7aF7up9LpAPX8LkoSBliIfiWByx2HDNU2FPzSqcCy1yuYFIe6BTNogTp8XjFjGIFru19t4bC7yhQF0UOUHyqCYnxQpOEEcM8zJfINERLJMmD/IYgzI2MlCPprGjr2EkIwtx1STmhw0ssRQJKxqNYgR2HIMwtopQeenHlOnFMTyaCPQpxHw6+cOgX2g11Viu7mJ2gSzO/5viQu+TMkCzo5ufGB1vk+CVM4vCDbS99ffbKEI5J+9/Ax4l9fFjMERYzrffGlota/IjEpKEF7Lw9hP7LF6NkQkD8z4/5P0eRZrlVgPOgAAAAAElFTkSuQmCC) 0 0/contain; + border: none; + outline: none; + cursor: pointer +} + + + +.word-details-pane-footer { + padding: 0 30px 30px +} + +.word-details-pane mark.highlight { + color: #2e94f7; + background: none +} + +.word-details-item { + margin-bottom: 50px +} + +.word-details-item:last-of-type { + margin-bottom: 0 +} + +.word-details-item>h2 { + display: none; + font-size: 20px; + line-height: 28px; + margin: 0 0 20px; + font-weight: 400 +} + +.word-details-button-expand { + cursor: pointer +} + +.word-details-button-feedback { + padding: 10px 25px; + font-size: 14px; + border-radius: 20px; + background-color: #fff; + border: 1px solid #2e94f7; + color: #2e94f7 +} + +.word-details a { + color: #2e94f7 +} + +.word-details a:hover { + text-decoration: underline +} + +.word-details-ads,.word-details-ads-placeholder { + display: none; + min-height: 48px; + padding: 10px 32px 10px 54px +} + +.word-details-ads { + position: absolute; + left: 0 +} + +.word-details-ads-placeholder { + position: relative; + background: rgba(46,148,247,.1) +} + +.word-details-ads-placeholder:before { + content: ""; + width: 16px; + height: 17px; + position: absolute; + top: 10px; + left: 30px; + top: 14px; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAiCAYAAAA+stv/AAAAAXNSR0IArs4c6QAABTRJREFUWAm9Vn1oVlUYf851M5vkgixJbEb/hFLuryRNpT8ipGgWtcVmTEVZECV9qcQCZxGVUGF/BVnQh7GSmBgLYuhipUIzyFl/BK0N01n2MXAr53vvPU+/53zc9973vdt436AD9z7nnOfrd37nPOdeRf+hMXfNo9/HP0KIXnXdvneqCRVU4yQ+zE9cQb/+2UNR/ADFarjaOFUBYP5kDp2LP0Xy9aQ1UZ0aqhZATVWOZ/p3EtO9xlfxH6r+jb+qigOnigHwcMetFOku7IHNqdQ/1SYXv4oBYL/3E+u5pJTNy3rqfwPAP3asoShamUmogtrMuMJBZYfwcrSdIlAf4eAZafo3oBwrZ9IBnREAD229n09vWyS2WP1Cihklh+QxEhspQOIaOn2mIW/hfGrLc3xq814AnDbPtAo+uelFKoQ9pKnOBJ8srDLJJLkwYEAIEDxhvCoPABXiNgr1Dvp2pJt/6JqbZ5MLgAfbX0GS5xF8UDXuHzGOYbzSJItim1SkeQAm1PeVBjfMMS23YHUzTQz35oEoA8DH29uAfJehOOK+JHCsAcAlT6QwAABar+eRzfMSW+lMXnoczAQWtDCm76KLP72QscEgA4AHtlxLYfSmTS6B6fvEQevFJliaetOHXcT1dDbc6m15oH0FRbTd2ktyBzTSO3hg4x3eTmT29Oqp10nzNSQlDh84XhAj02Keb+YYAeUOEJltO/n4U+9SOLaWosL7MFiQVZtRAN+30VvudQkD3N+6EPv1sKHZHDLQrUN328A8wtXnD5+XWTYa6O+xSSrwF2BwUT5bWFWkl/GRlnUeQJGBQtgKymvt6mEoqRUt9YY4aGCDb7KrF73DJleyYQSyZEsT39KOCmS7BmQ6YQArbDOo/epEhjh4vsV81upLqkBY8JWRZcTuvYZe5kWaPuLG8UPMzXNKASwzh88EESNx1C38WYe9B2I9WK43Nt5W7B0YJ32ZJlLmzVNHn8dLEgDc11wPVHicgZeRvpoKF3Y7Eo45Zx/ESm8r0jxpUOm+03sWIru9dgvGCw3J3S4rl3veMGACPMsHNzxKTStOYG7MJvHJygA7FtJ6B6L47bDxL+ulsjB7CAMdUgFO0vyB8ofMnpO36OOTTcTqZ5Tf4sQm396EKb4AwDQvZSB9XZCeBTC1YIxoXMbQQSkH3P9wmEnzuse8vc4VQZm90cMy0bu+z+/1NQo5XRWoRw5cBO0T+XUudMLb77GpEkd9ul+pnmp/EQDFeyDSR7HsDQm9fguydZ63RRKn2GazF30QDKvWQ6PiVAQQc48FAAOhS8kLzffd0E54hZeeVxlLX86T2wOJ42OIWgAwH5KutBSA2sOkpiZgfJVVubdxRl+kNJ/LxS9LmCQXELmNwfKHXpPchOqx3nH8cO7NnAPZY6lbL9N9mZNHPs1eJp9p/9l2vqa0vT13q46+78oAmInaK/E1pHPmapVkJqF8lCSQJHKBvfSBvfSg0tLrRMZ8CaR3+uQiEyL9JL925+3Yo35wnv3B8AZle4DAyVxilN8Jglb19JfdaWUZAFHyq+s2YtkfYN/VrFWRjjZTXwV71K6BrlKTXABixC+vfhA333sAMd+ewGlNS2Nmx0rFiPGM6vx6X1ZhRzNG5ZfW4tcqPoCSvGXaKijdAYno54hG0d+mdp84kpdc5pIqyDNQnV8NEd/diIO5CQdxNOdrmV8lzL+hMp4kveTmmZJLzhkZSINiZkV7Vt8GRpowvwYrux7ueDQWEZwHS+cx/gYfq8PUeOMx1XIQJTN7+xcs/bB+XniprgAAAABJRU5ErkJggg==) no-repeat 0/100% +} +.audio { + display: inline-block; + width: 20px; + height: 20px; + position: relative; + overflow: hidden; + cursor: pointer; + vertical-align: middle; + background: url(img/audio-dark-ea178.png) no-repeat -40px 0/auto 100% +} + +.audio-light { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA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xdz0iv2XcjQ4R8nh6tAVg+qIBgIIDCg4oOAAKDig4AAoOAuBMgAEAYBYyuvW+UO8AAAAASUVORK5CYII=) +} + +.audio-state-playing { + -webkit-animation: audio-playing .6s steps(3) infinite alternate; + animation: audio-playing .6s steps(3) infinite alternate +} + +@-webkit-keyframes audio-playing { + 0% { + background-position: 0 0 + } + + to { + background-position: -60px 0 + } +} + +@keyframes audio-playing { + 0% { + background-position: 0 0 + } + + to { + background-position: -60px 0 + } +} + .hjenglish dl,.hjenglish dt,.hjenglish dd,.hjenglish p,.hjenglish ul,.hjenglish li,.hjenglish h3{margin:0;padding:0;margin-block-start:0;margin-block-end:0;margin-inline-start:0;margin-inline-end:0} .hjenglish h3{font-size:1em;font-weight:normal} - .hjenglish .detail-pron,.hjenglish .pronounces{color:#777} + .hjenglish .detail-pron,.hjenglish .pronounces{color: #00c;} .hjenglish ul{margin-left:2em} .hjenglish .def-sentence-from,.hjenglish .def-sentence-to{display:none} .hjenglish .detail-groups dd h3:before{counter-increment:eq;content:counter(eq) ".";display:block;width:22px;float:left} @@ -136,7 +367,7 @@ var iconDrag = new Drag(icon); // 图标数组 var iconArray = [{ - name: '多词典查询', + name: '沪江小D', id: 'icon-dict', image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAAXNSR0IArs4c6QAAFtFJREFUeAHNXWuMXddV3ufOnbE9xtTP2DUo2I6dUNwWKWooVmniCFVUbcCFqpXyi0iIlqoBIX7wbrBUlX+AKhKqWkiJQFA1VWgjUEVLpDZpiqEuSaGE0jgPJzFOHMevjO2ZsWfO4fvW2t85++5z78y5dh13W+estdde7732Pvvce20XYcz2kW9XkxeeD7dA7N1FEXZVIWwrQtgKuKaqwppeCCuAT+DqYbwHGoA30AJxQjbh9TgGyAwZbxlD1gUflRcGTUDC0aLxY7hXgaUIJfqLEJmD4RngMzBzDPAIaIch/43p7eHQgXcUl6L1ToA2OrVffai6dbEMH4PRfcjAKgrBL/g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+EvCRfHU6U9sfhsO4JVXIHfjMPHxtKyHl7DPmGbQZgQ3g1Bs5R+hloLgUH3gNV2EHeSli3DYleogTqWCRCgjOFQ+6nVfkT6y4+aQuF/MFZNHE/Xv0M7cs+lREO+Pdt2w+0CStfgNg/2airgtNcFY/6SpCSO0C7caEq+do5MccZohxCNiMgmu8RzKtvkFPyhHXPI5pDxpasLFR7poxBkzqu9+5op9NvtI39EQVleb754Jr7wVszP0nwBl6affG9dHhLimOauYBJ9pKM2XjIWCQ6GHBAbh8aBIumTkUwo1RsjW5odum4joEKK3BMQsuN3EPvSINlyfmalvSN4h5uhsTfFNLOkiiZ86vrm6VNo/Qks3aDu6YyWM/Bg0oYyhFWBMqKqLySVOyNZKgIzFgHP+xhtnYK5Sf3J+2ZJ9M5rcWvzwSDGQbSC8ong+TPb2nP+jzQP/kq9HkiglakmcLx+G4XemDg5qzIQ6dAccAn8rQBmLCW6pzBI8rj8t+zAgGm0JJ2TTBGEE/wxyb1+ePPLUeyA7amS8rrdlL/w9wC2EfvNiEzQ8dshgTBxPGIRrnEucuDZwshot6mU/vdAdtBd7rFz/w3H+iXLUT9zsEHPcENy0PRPycl8cyi9B96vgGf0AczEsedSrZMtGC676xPE9ZbF4Lzy72SyqSlqcURv9llbhhGzZFGu5jNzTlpG3bEmn6UeHGagrOFOQdev1P4y/KJ7oVRN3z35y80HzfcRNoY4Ybsgr9x+7tVysPgbvfglOXt0ftTRmBzElS17nCRnkXr7X1mf/GUFvovjM3P6tjy2voKmVLrzGs3t/NfVcePUdi+XCu4uy2IX/8GIbnqZbMfX47zAK/Btc1UrMLL9jwd9sZs3Vn8V0ttGZsZ2ApsprJXZes1MXPl7BT8KKeRzhZsCIqzqG/hEs/MP411Ee3zGx9dBT+wt+xdG5/T/UbuDazuxLpwAAAABJRU5ErkJggg==', trigger: function (text, time) { @@ -548,8 +779,8 @@ for (var id in idsExtension.lowerCaseMap) { if (engineResult[id] && engineResult[idsExtension.lowerCaseMap[id]] && - engineResult[id].innerHTML != engineResult[idsExtension.lowerCaseMap[id]].innerHTML && - engineResult[id].innerHTML.toLowerCase() != engineResult[idsExtension.lowerCaseMap[id]].innerHTML.toLowerCase()) { + engineResult[id].innerHTML !== engineResult[idsExtension.lowerCaseMap[id]].innerHTML && + engineResult[id].innerHTML.toLowerCase() !== engineResult[idsExtension.lowerCaseMap[id]].innerHTML.toLowerCase()) { var engine = contentList.querySelector('tr-engine[data-id="' + id + '"]'); if (engine) { engine.appendChild(engineResult[id]); @@ -663,13 +894,114 @@ }); return type; } + + // 音频播放器 + function AudioPlayer() { + var audio = document.createElement('audio'); + audio.setAttribute('controls', 'controls'); + audio.style.display = 'none'; + // audio.setAttribute('src', src); + document.body.appendChild(audio); + + this.play = function (src) { + audio.setAttribute('src', src); + audio.play(); + return this; + }; + this.stop = function () { + audio.pause(); + return this; + }; + // 播放结束回调 + this.end = function (callback) { + var repeat = setInterval(function () { + if (audio.ended) { + clearInterval(repeat); + callback && callback(); + } + }, 100); + setTimeout(function () { + clearInterval(repeat); + }, 5000); + }; + + return this; + } + + /**沪江小D排版*/ function parseHjenglish(rst) { var dom = document.createElement('div'); dom.setAttribute('class', ids.HJENGLISH); var parser = new DOMParser(), doc = parser.parseFromString(rst, 'text/html'), + //content = doc.documentElement; content = doc.getElementsByClassName('word-details')[0]; dom.appendChild(content); + //添加音频按钮 + var auds = dom.querySelectorAll('.word-audio'); + auds.forEach(function (aud) { + if (aud.getAttribute('data-src')) { + aud.classList.add('audio'); + aud.classList.add('audio-light'); + aud.addEventListener('click', function () { + var p = new AudioPlayer(); + p.play(aud.getAttribute('data-src')) + }, true) + } + }); + + /*document.addEventListener('click',function (e) { + debugger + });*/ + + var panee = dom.querySelectorAll('.word-details-pane-footer'); + panee.forEach(function (pane) { + pane.parentNode.removeChild(pane); + }); + + var wDHs = dom.querySelectorAll('.word-details-header>p'); + wDHs.forEach(function (wDH) { + wDH.parentNode.removeChild(wDH); + }); + var addScbs = dom.querySelectorAll('.add-scb'); + addScbs.forEach(function (addScb) { + addScb.parentNode.removeChild(addScb) + + }); + + var feed = dom.querySelector('.button word-details-button-feedback'); + if (feed) { + feed.parentNode.removeChild(feed) + } + var tabss = dom.querySelectorAll('.word-details-tab'); + + if (tabss.length > 1) { + var panes = dom.querySelectorAll('.word-details-pane'); + var j = 0; + var dat = panes; + for (j; j < tabss.length; ++j) { + tabss[j].addEventListener('click', function () { + if (this.classList.contains('word-details-tab-active')) { + return false + } + this.parentNode.querySelector('.word-details-tab-active').classList.remove('word-details-tab-active'); + var that = this; + + tabss.forEach(function (v, k, p) { + if (v === that) { + panes = dom.querySelectorAll('.word-details-pane'); + var tm = dat[k].cloneNode(true); + panes[k].parentNode.insertBefore(tm, panes[k].parentNode.firstChild); + panes[k].parentNode.removeChild(panes[k]); + } + }); + this.classList.add('word-details-tab-active') + }, true) + } + } + + //var de = dom.querySelector('') + //debugger /*try { var doc = htmlToDom(cleanHtml(rst)); var label = doc.querySelector('.word-details-item-content header');