# \[DictTango\] 反馈历史 (作参考用，请勿回复此帖）

**URL:** <https://forum.freemdict.com/t/topic/28193>\
**Category:** DictTango\
**Tags:** dicttango\
**Created:** [2020 年6 月 19 日 14:43 UTC](https://forum.freemdict.com/t/topic/28193 "2020-06-19T14:43:02Z")\
**Posts on this page:** 20\
**Page:** 48

<div class="post-metadata">

作者： ![glacierlee](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/glacierlee/32/96873_2.png) [@glacierlee](https://forum.freemdict.com/u/glacierlee)\
发布日期： [2022 年6 月 7 日 04:33 UTC](https://forum.freemdict.com/t/topic/28193/942 "2022-06-07T04:33:18Z")

</div>

对的，这个受手机系统影响比较大

---

<div class="post-metadata">

作者： ![WalkingDictionary](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/w/41988e/32.png) [@WalkingDictionary](https://forum.freemdict.com/u/WalkingDictionary)\
发布日期： [2022 年6 月 13 日 12:39 UTC](https://forum.freemdict.com/t/topic/28193/943 "2022-06-13T12:39:46Z")

</div>

现在怕尝试折腾新东西。但是看大家评价这么高，忍不住心痒痒，好奇问问大家这个跟欧路比牛在哪里？

---

<div class="post-metadata">

作者： ![anon34331345](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/a/d9b06d/32.png) [@anon34331345](https://forum.freemdict.com/u/anon34331345)\
发布日期： [2022 年6 月 19 日 02:01 UTC](https://forum.freemdict.com/t/topic/28193/944 "2022-06-19T02:01:14Z")

</div>

DictTango 合并显示“相同词头”词条时，词典 JavaScript 文件被 **重复载入/执行** ，影响效率，也让一些功能失效。

---

<div class="post-metadata">

作者： ![glacierlee](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/glacierlee/32/96873_2.png) [@glacierlee](https://forum.freemdict.com/u/glacierlee)\
发布日期： [2022 年6 月 19 日 02:15 UTC](https://forum.freemdict.com/t/topic/28193/945 "2022-06-19T02:15:51Z")

</div>

在词典制作时可以参考一下如下的文章：

> **[Preventing JavaScript Files from Loading Multiple Times](https://blog.michaelckennedy.net/2012/10/11/preventing-javascript-files-from-loading-multiple-times/)**
>
> This post is about ensuring that you do not execute a particular JavaScript file more than one time. Let’s start by asking: What happens if you link to a js file twice in your page? Here is a…

在应用层面可以做的不多，无非就是几个方法：  
1） 把每个词条都放在一个iframe里，使用iframe的优缺点网上已经有很多文章，我这里就不再一一列出了  
2）在合并词条时去掉相同的文件，这个会很容易导致问题发生，而且影响性能  
2） 不合并词条，这个会影响观感

---

<div class="post-metadata">

作者： ![hua](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/hua/32/11090_2.png) [@hua](https://forum.freemdict.com/u/hua)\
发布日期： [2022 年6 月 19 日 02:23 UTC](https://forum.freemdict.com/t/topic/28193/946 "2022-06-19T02:23:36Z")

</div>

我也查过很多资料，最靠谱的还是使用 iframe。至于多占用的计算资源消耗，也算不上什么。

---

<div class="post-metadata">

作者： ![glacierlee](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/glacierlee/32/96873_2.png) [@glacierlee](https://forum.freemdict.com/u/glacierlee)\
发布日期： [2022 年6 月 19 日 02:33 UTC](https://forum.freemdict.com/t/topic/28193/947 "2022-06-19T02:33:17Z")

</div>

> [@hua](#):
>
> 我也查过很多资料，最靠谱的还是使用 iframe。至于多占用的计算资源消耗，也算不上什么。

我觉得其实最重要的是避免函数的重复执行，这个可以通过判断是否第一次调用来避免。  
用iframe的话，也是相当于重复加载javascript文件了，如果抛开js函数的重复执行问题，其实用不用iframe没有多大的区别。

---

<div class="post-metadata">

作者： ![anon34331345](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/a/d9b06d/32.png) [@anon34331345](https://forum.freemdict.com/u/anon34331345)\
发布日期： [2022 年6 月 19 日 03:05 UTC](https://forum.freemdict.com/t/topic/28193/948 "2022-06-19T03:05:20Z")

</div>

> [@glacierlee](#):
>
> 在词典制作时可以参考一下如下的文章

会仔细看看这篇文章

---

<div class="post-metadata">

作者： ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
发布日期： [2022 年6 月 19 日 03:20 UTC](https://forum.freemdict.com/t/topic/28193/949 "2022-06-19T03:20:04Z")

</div>

iframe的高度没法自适应。那种会折叠的词典，体验应该很差。

---

<div class="post-metadata">

作者： ![glacierlee](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/glacierlee/32/96873_2.png) [@glacierlee](https://forum.freemdict.com/u/glacierlee)\
发布日期： [2022 年6 月 19 日 03:47 UTC](https://forum.freemdict.com/t/topic/28193/950 "2022-06-19T03:47:30Z")

</div>

> [@last\_idol](#):
>
> iframe的高度没法自适应。那种会折叠的词典，体验应该很差。

是的，所以在移动端用iframe可能不是最优的办法，特别是像谷歌翻译这类在线词典还会封锁从iframe访问

---

<div class="post-metadata">

作者： ![meaningless](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/m/edb3f5/32.png) [@meaningless](https://forum.freemdict.com/u/meaningless)\
发布日期： [2022 年6 月 19 日 06:12 UTC](https://forum.freemdict.com/t/topic/28193/951 "2022-06-19T06:12:25Z")

</div>

Could you please make a function which if I call a specific url like dtg://search/word then dictionary entry for word will pop up?

---

<div class="post-metadata">

作者： ![glacierlee](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/glacierlee/32/96873_2.png) [@glacierlee](https://forum.freemdict.com/u/glacierlee)\
发布日期： [2022 年6 月 19 日 06:26 UTC](https://forum.freemdict.com/t/topic/28193/952 "2022-06-19T06:26:54Z")

</div>

> [@meaningless](#):
>
> Could you please make a function which if I call a specific url like dtg://search/word then dictionary entry for word will pop up?

Here you go.

```auto
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=5.0"/>

<script>
function testJs()
{
	
	try
	{
		//window.open("dttp://app.dicttango/WordLookup?word=test");
		location.href = "dttp://app.dicttango/WordLookup?word=test";
	}
	catch(e)
	{
		alert(e.message);
	}
}
</script>
</head>
<body>
<p><p><p><p>
<!-- Hyper Link -->
<a href="dttp://app.dicttango/WordLookup?Word=test">test</a>

<p><p><p><p>
<!-- Javascript -->
<span onclick="testJs()">test JS</span>
</body>
</html>

```

---

<div class="post-metadata">

作者： ![meaningless](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/m/edb3f5/32.png) [@meaningless](https://forum.freemdict.com/u/meaningless)\
发布日期： [2022 年6 月 19 日 07:25 UTC](https://forum.freemdict.com/t/topic/28193/953 "2022-06-19T07:25:18Z")

</div>

That’s is very helpful. Thank you so much.  
Btw, the wordbook function is kind of limited. If you could implement it like a flashcard system then It’d be amazing. Or maybe ‘add word to Anki’ function?

---

<div class="post-metadata">

作者： ![glacierlee](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/glacierlee/32/96873_2.png) [@glacierlee](https://forum.freemdict.com/u/glacierlee)\
发布日期： [2022 年6 月 20 日 12:39 UTC](https://forum.freemdict.com/t/topic/28193/954 "2022-06-20T12:39:29Z")

</div>

> [@meaningless](#):
>
> Btw, the wordbook function is kind of limited. If you could implement it like a flashcard system then It’d be amazing. Or maybe ‘add word to Anki’ function?

Currently there no plan to enhance the wordbook, you can export the wordbook data and transform it into the Anki’s format I guess.

---

<div class="post-metadata">

作者： ![meaningless](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/m/edb3f5/32.png) [@meaningless](https://forum.freemdict.com/u/meaningless)\
发布日期： [2022 年6 月 29 日 09:55 UTC](https://forum.freemdict.com/t/topic/28193/955 "2022-06-29T09:55:40Z")

</div>

Is it possible to choose word group when using this method?

---

<div class="post-metadata">

作者： ![alexpeng](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/alexpeng/32/19592_2.png) [@alexpeng](https://forum.freemdict.com/u/alexpeng)\
发布日期： [2022 年6 月 29 日 11:34 UTC](https://forum.freemdict.com/t/topic/28193/956 "2022-06-29T11:34:51Z")

</div>

点译时似乎未能识别伪类。

 ![IMG_20220629](https://forumcdn.freemdict.com/uploads/default/original/3X/d/c/dc548e417ca274aef7f23512a6f75045fc752bb1.jpeg)

词典链接：

> [@牛津英语同义词英汉双解简体增强版(1.14修复两处内容缺失)](https://forum.freemdict.com/t/topic/13760):
>
> 在简体版的基础上做了如下的修改增强 合并相同的词头 添加正确的跳转，可直接跳转到对应词条释义的位置 仿照纸质版辞典进行样式调整 [截屏2022-07-09 11.46.13] [截屏2022-06-26 00.56.17] [截屏2022-06-26 00.56.36] [olect.css](https://forum.freemdict.com/uploads/short-url/A6UhTrUTHQJ6Bzie8qfeb4f8ECy.css) (18.0 KB) [olect.mdx](https://forum.freemdict.com/uploads/short-url/pWLdAcQTbaqCGkNVclOpmXjZeq1.mdx) (5.9 MB)

Mdict app，安卓欧路此处点译正常。

---

<div class="post-metadata">

作者： ![glacierlee](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/glacierlee/32/96873_2.png) [@glacierlee](https://forum.freemdict.com/u/glacierlee)\
发布日期： [2022 年6 月 29 日 12:31 UTC](https://forum.freemdict.com/t/topic/28193/957 "2022-06-29T12:31:21Z")

</div>

> [@meaningless](#):
>
> Is it possible to choose word group when using this method?

What is a word group?

---

<div class="post-metadata">

作者： ![glacierlee](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/glacierlee/32/96873_2.png) [@glacierlee](https://forum.freemdict.com/u/glacierlee)\
发布日期： [2022 年6 月 29 日 12:36 UTC](https://forum.freemdict.com/t/topic/28193/958 "2022-06-29T12:36:16Z")

</div>

> [@alexpeng](#):
>
> 点译时似乎未能识别伪类。

这个可能比较难调整了，DictTango采用的是浏览器识别的方式，原理就好像你在浏览器中双击选择英文单词一样。

我把词典内容提取出来，然后在Chrome浏览器里双击也是一样的效果。

 ![image](https://forumcdn.freemdict.com/uploads/default/original/3X/2/0/207a3219865106aabd9880897fe7eba8944948ee.png)

---

<div class="post-metadata">

作者： ![alexpeng](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/alexpeng/32/19592_2.png) [@alexpeng](https://forum.freemdict.com/u/alexpeng)\
发布日期： [2022 年6 月 29 日 23:16 UTC](https://forum.freemdict.com/t/topic/28193/960 "2022-06-29T23:16:23Z")

</div>

原来如此 👍

---

<div class="post-metadata">

作者： ![meaningless](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/m/edb3f5/32.png) [@meaningless](https://forum.freemdict.com/u/meaningless)\
发布日期： [2022 年6 月 30 日 11:49 UTC](https://forum.freemdict.com/t/topic/28193/961 "2022-06-30T11:49:52Z")

</div>

Oops, sorry. I mean dictionary group

---

<div class="post-metadata">

作者： ![glacierlee](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/glacierlee/32/96873_2.png) [@glacierlee](https://forum.freemdict.com/u/glacierlee)\
发布日期： [2022 年7 月 3 日 02:38 UTC](https://forum.freemdict.com/t/topic/28193/962 "2022-07-03T02:38:36Z")

</div>

> [@meaningless](#):
>
> Oops, sorry. I mean dictionary group

I see. There is no feature to select dictionary group when using this method.

[上一页](https://forum.freemdict.com/t/topic/28193.md?page=47)

[下一页](https://forum.freemdict.com/t/topic/28193.md?page=49)
