# DictTango平台识别

**URL:** <https://forum.freemdict.com/t/topic/36202>\
**Category:** 技术交流与词典编修\
**Tags:** dicttango\
**Created:** [2025 年1 月 27 日 03:41 UTC](https://forum.freemdict.com/t/topic/36202 "2025-01-27T03:41:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

作者： ![dfL](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/dfl/32/68690_2.png) [@dfL](https://forum.freemdict.com/u/dfL)\
发布日期： [2025 年1 月 27 日 03:41 UTC](https://forum.freemdict.com/t/topic/36202/1 "2025-01-27T03:41:36Z")

</div>

此内容根据与开发者Jimex交流后尝试成功。

1. 判断平台是DictTango

```auto
if(typeof _appContext !== 'undefined' && _appContext.appName == 'DictTango')

```

1. 在进行了前述判断后，判定不处于列表模式（版本2.3.2.0开始，之前版本应该会直接认为是列表模式）

```auto
if(_appContext.dictTango && _appContext.dictTango.fromListViewLookupMode == false)

```

1. 列表模式下跳转到指定id的内容

```auto
window.location.href='entry://item/#'+id

```

开发者告诉我的\_dtJumpTo(id)好像不行。另外列表模式下，`window.location.href='entry://#id'`不起作用，`scrollTo()`之类的不出意外不起作用。  
4. 非列表模式（滑动、阅读）下的跳转  
上述三种方式均可使用。
