智能划词翻译 was reported 2021-07-20 as an unauthorized copy of 智能划词翻译.

智能划词翻译 does not specify a license, which means distributing copies is not allowed unless explicit permission is given.

The reporter said:
The original script infringes the copyright of a script. If you can't view the original script, check the history version of that script: https://greasyfork.org/en/scripts/34921-translate/code?version=230790
Script License Created Updated
Reported 智能划词翻译 N/A 2018-10-08 10:01:55 UTC 2018-10-09 08:10:31 UTC
Original 智能划词翻译 N/A 2017-11-16 17:34:33 UTC 2018-05-19 11:06:46 UTC
  • // ==UserScript==
  • // @name 智能划词翻译
  • -// @namespace https://greasyfork.org/zh-CN/users/150560
  • -// @version 1.3.3
  • +// @namespace https://greasyfork.org/zh-CN/users/218117-%E8%B7%AF%E9%81%A5%E7%88%B8%E7%88%B8
  • +// @version 1.3.4
  • // @description 划词翻译,自动切换谷歌翻译和有道词典
  • -// @author 田雨菲
  • +// @author 田雨菲 update by 路遥
  • // @match http://*/*
  • // @include https://*/*
  • // @run-at document-end
  • return length;
  • }
  • + function selectText(text) {
  • + var range;
  • + if (document.body.createTextRange) {
  • + range = document.body.createTextRange();
  • + range.moveToElementText(text);
  • + range.select();
  • + } else if (window.getSelection) {
  • + var selection = window.getSelection();
  • + range = document.createRange();
  • + range.selectNodeContents(text);
  • + selection.removeAllRanges();
  • + selection.addRange(range);
  • + /*if(selection.setBaseAndExtent){
  • + selection.setBaseAndExtent(text, 0, text, 1);
  • + }*/
  • + } else {
  • + alert("none");
  • + }
  • + }
  • +
  • function isChina(str){
  • - var reg=/^([\u4E00-\u9FA5]|[\uFF00-\uFF20]|[\u3000-\u301C])+$/;
  • + var reg=/.*[\u4e00-\u9fa5]+.*$/;///^([\u4E00-\u9FA5]|[\uFF00-\uFF20]|[\u3000-\u301C])+$/;
  • return !!reg.test(str);
  • }
  • // ajax 跨域访问公共方法
  • displaycontainer(html, element);
  • }
  • - function displaycontainer(text, element) {
  • + function displaycontainer(text, dom) {
  • + debugger
  • + dom.style.display = 'block';// 显示结果
  • + var element = document.getElementById("luyao-content");
  • element.innerHTML = text;
  • - element.style.display = 'block';// 显示结果
  • + var button = document.getElementById("luyao-btn");
  • + button.onclick = function(){
  • + selectText(element);
  • + document.execCommand("Copy");
  • + icon.style.display = 'none';
  • + server.containerDestroy();
  • + }
  • }
  • // 翻译server
  • },
  • // 生成翻译结果面板 DOM (此时还未添加到页面)
  • container: function () {
  • + var container = document.createElement('div');
  • + container.setAttribute('style', 'position:absolute!important;display: none');
  • var div = document.createElement('div');
  • + div.setAttribute("id", "luyao-content");
  • div.setAttribute('style', '' +
  • - 'display:none!important;' +
  • - 'position:absolute!important;' +
  • 'font-size:13px!important;' +
  • 'overflow:auto!important;' +
  • 'background:#fff!important;' +
  • 'max-height:216px!important;' +
  • 'z-index:2147483647!important;' +
  • '');
  • - return div;
  • + var button = document.createElement("button");
  • + button.setAttribute("id", "luyao-btn");
  • + button.setAttribute("style", "position: absolute;right: -50px; top: 0;width: 38px;height: 25px;margin: 5px;font-size: 13px;padding: 0;background: #3379DD;border-radius:5px;border: 1px solid #3379DD;color: white;");
  • + button.innerHTML = "复制";
  • + container.appendChild(div);
  • + container.appendChild(button);
  • + return container;
  • }
  • };// 翻译server结束
  • })();

路遥爸爸 (the reported user) has made:

This report has been upheld by a moderator.