Forums
5
Product Forums
25
General Purpose MicrocontrollersGeneral Purpose Microcontrollers
i.MX Forumsi.MX Forums
QorIQ Processing PlatformsQorIQ Processing Platforms
Identification and SecurityIdentification and Security
Power ManagementPower Management
Wireless ConnectivityWireless Connectivity
RFID / NFCRFID / NFC
Advanced AnalogAdvanced Analog
MCX Microcontrollers
S32G
S32K
S32V
MPC5xxx
Other NXP Products
S12 / MagniV Microcontrollers
Powertrain and Electrification Analog Drivers
Sensors
Vybrid Processors
Digital Signal Controllers
8-bit Microcontrollers
ColdFire/68K Microcontrollers and Processors
PowerQUICC Processors
OSBDM and TBDML
S32M
S32Z/E
Solution Forums
4
Smart Home
Power & Energy
Mobile Robotics
Motor Control
Software Forums
16
MCUXpresso Software and ToolsMCUXpresso Software and Tools
CodeWarriorCodeWarrior
MQX Software SolutionsMQX Software Solutions
Model-Based Design Toolbox (MBDT)Model-Based Design Toolbox (MBDT)
FreeMASTER
eIQ Machine Learning Software
Embedded Software and Tools Clinic
S32 SDK
S32 Design Studio
GUI Guider
Zephyr Project
Voice Technology
Application Software Packs
Secure Provisioning SDK (SPSDK)
Processor Expert Software
Generative AI & LLMs
Topics
8
Mobile Robotics - Drones and RoversMobile Robotics - Drones and Rovers
NXP Training ContentNXP Training Content
University ProgramsUniversity Programs
Rapid IoT
NXP Designs
SafeAssure-Community
OSS Security & Maintenance
Using Our Community
Cloud Lab Forums
2
Hardware
Cloud Lab Knowledge Base
Knowledge Bases
21
ARM Microcontrollers
7
K32 L Series Microcontrollers Knowledge Base
Kinetis Microcontrollers Knowledge Base
Kinetis Motor Suite Knowledge Base
LPC FAQs Knowledge Base
LPC Microcontrollers Knowledge Base
LPCware Archive Content
MCX Microcontrollers Knowledge Base
i.MX Processors
5
i.MX RT Crossover MCUs Knowledge Base
i.MX Graphics Knowledge Base
i.MX Processors Knowledge Base
i.MX Solutions Knowledge Base
i.MX 한국어 커뮤니티 Knowledge Base
Identification and Security
3
EdgeLock 2GO Secure Service Knowledge Base
Secure Authentication Knowledge Base
Smart Cards and Secure Element Knowledge Base
Model-Based Design Toolbox (MBDT)
0
QorIQ Processing Platforms
0
S32 Automotive Processing Platform
0
Wireless Connectivity
3
Other Connectivity Knowledge Base
Wi-Fi® + Bluetooth® + 802.15.4 Knowledge Base
Wireless Connectivity Knowledge Base
CodeWarrior
0
MCUXpresso Suite of Software and Tools
0
MQX Software Solutions
0
RFID / NFC
0
Advanced Analog
2
High Performance Analog Front End Interfaces
In Vehicle Networking
8-bit Microcontrollers Knowledge Base
Motor Control and Smart Energy Knowledge Base
Power Management Knowledge Base
FRDM Training Hub
MCUXpresso Training Hub
Zephyr Project Knowledge Base
Generative AI & LLMs Knowledge Base
Embedded World NXP Connectivity Workshop Knowledge Base
Hands-on workshop in Japan (ハンズオン・ワークショップ [日本]) Knowledge Base
NXP Tech Blogs
1
NXP Tech Blog
Ideas
Blogs
论坛
知识库
观点
博文
NXP.COM
登录
帮助
语言
英语(美国) | English (US)
日本語 | Japanese
中文 | Chinese (Simplified)
Home
:
产品论坛
:
8位微控制器
:
I need help about 68HC705C8
I need help about 68HC705C8
整个社区
此类别
此讨论板
知识库
用户
产品
取消
开启建议
自动建议可通过在您键入时建议可能的匹配,而快速缩小您的搜索结果范围。
显示结果
显示
仅
|
搜索替代
您的意思是:
选项
订阅 RSS 提要
将主题标记为新
将主题标记为已读
为当前用户浮动此 主题
书签
订阅
禁止
打印机友好页面
I need help about 68HC705C8
07-07-2007
03:06 AM
2,738 次查看
Gabriel_Markez
Contributor I
标记为新
加注书签
订阅
禁止
订阅 RSS 提要
高亮显示
打印
报告不当内容
I need read EPROM/OTPROM (PROM) in order to program other 68HC705C8.
How can I do it ?... Can I Build a Reader/Programmer for the 68HC705C8 MicroController? would you recommend what software to use?...
标签
(1)
标签
标签:
General
0
项奖励
回复
所有论坛主题
前一个主题
下一个主题
2 回复数
07-10-2007
11:17 AM
1,584 次查看
MidonDesign
Contributor II
标记为新
加注书签
订阅
禁止
订阅 RSS 提要
高亮显示
打印
报告不当内容
I have a programmer schematic and DOS programming code available on my website at:
http://www.midondesign.com/PROG05/PROG05.html
Regards,
Mitch
0
项奖励
回复
07-07-2007
07:49 AM
1,584 次查看
peg
Senior Contributor IV
标记为新
加注书签
订阅
禁止
订阅 RSS 提要
高亮显示
打印
报告不当内容
Hi Gabriel,
You can read all about this, along with programmer circuits in the devices data sheet.
MC68HC705C8A.pdf
which can be found here:
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?ProdMetaId=ProdMetaId%2FDocumentation%2F68...
&
However if the security has been set, none of this will help you read the contents of the PROM.
0
项奖励
回复
发布回复
' var data = div.getElementsByClassName("video-js"); var script = document.createElement('script'); script.src = "https://players.brightcove.net/" + data_account + "/" + data_palyer + "_default/index.min.js"; for(var i=0;i< data.length;i++){ videodata.push(data[i]); } } } for(var i=0;i< videodata.length;i++){ document.getElementsByClassName('lia-vid-container')[i].innerHTML = videodata[i].outerHTML; document.body.appendChild(script); } } catch(e){ } /* Re compile html */ $compile(rootElement.querySelectorAll('div.lia-message-body-content')[0])($scope); } if (code_l.toLowerCase() != newBody.getAttribute("slang").toLowerCase()) { /* Adding Translation flag */ var tr_obj = $filter('filter')($scope.sourceLangList, function (obj_l) { return obj_l.code.toLowerCase() === newBody.getAttribute("slang").toLowerCase() }); if (tr_obj.length > 0) { tr_text = "内容由 lilicon-trans-text 使用 AI 辅助工具翻译".replace(/lilicon-trans-text/g, tr_obj[0].title); tr_text +='
查看原文
'; try { if ($scope.wootMessages[$rootScope.profLang] != undefined) { tr_text = $scope.wootMessages[$rootScope.profLang].replace(/lilicon-trans-text/g, tr_obj[0].title); tr_text +='
查看原文
'; } } catch (e) { } } else { //tr_text = "This message was translated for your convenience!"; tr_text = "lilicon-trans.your.convenience"; } try { if (!document.getElementById("tr-msz-" + value)) { var tr_para = document.createElement("P"); tr_para.setAttribute("id", "tr-msz-" + value); tr_para.setAttribute("class", "tr-msz"); tr_para.style.textAlign = 'justify'; var tr_fTag = document.createElement("IMG"); tr_fTag.setAttribute("class", "tFlag"); tr_fTag.setAttribute("alt", "翻译图标"); // tr_fTag.setAttribute("title", "翻译图标免责声明"); tr_fTag.setAttribute("src", "/html/assets/translate-icon.svg"); tr_para.appendChild(tr_fTag); var container = document.createElement('span'); container.innerHTML = tr_text; //var tr_textNode = document.createTextNode(container); tr_para.appendChild(container); /* Woot message only for multi source */ if(rootElement.querySelector(".lia-message-body-content").previousElementSibling != null && rootElement.querySelector(".lia-message-body-content").previousElementSibling.getAttributeNames().includes("data-generation-timestamp")){ rootElement.querySelector(".lia-message-body-content").previousElementSibling.remove() } if(rootElement.querySelector(".lia-quilt-forum-message")){ rootElement.querySelector(".lia-quilt-forum-message .lia-message-body").insertBefore(tr_para,rootElement.querySelector(".lia-message-body-content")); } else if(rootElement.querySelector(".lia-message-view-blog-topic-message")) { rootElement.querySelector(".lia-message-view-blog-topic-message .lia-message-body").insertBefore(tr_para,rootElement.querySelector(".lia-message-body-content")); } else if(rootElement.querySelector(".lia-quilt-blog-reply-message")){ rootElement.querySelector(".lia-quilt-blog-reply-message .lia-message-body").insertBefore(tr_para,rootElement.querySelector(".lia-message-body-content")); } else if(rootElement.querySelector(".lia-quilt-tkb-message")){ rootElement.querySelectorAll(".lia-quilt-tkb-message .lia-message-body")[0].insertBefore(tr_para,rootElement.querySelector(".lia-message-body-content")); } else if(rootElement.querySelector(".lia-quilt-tkb-reply-message")){ rootElement.querySelectorAll(".lia-quilt-tkb-reply-message .lia-message-body")[0].insertBefore(tr_para,rootElement.querySelector(".lia-message-body-content")); } else if(rootElement.querySelector(".lia-quilt-idea-message")){ rootElement.querySelector(".lia-quilt-idea-message .lia-message-body").insertBefore(tr_para,rootElement.querySelector(".lia-message-body-content")); } else if(rootElement.querySelector(".lia-quilt-idea-reply-message")){ rootElement.querySelector(".lia-quilt-idea-reply-message .lia-message-body").insertBefore(tr_para,rootElement.querySelector(".lia-message-body-content")); } else if(rootElement.querySelector('.lia-quilt-occasion-message')){ rootElement.querySelector('.lia-quilt-occasion-message .lia-message-body').insertBefore(tr_para,rootElement.querySelector(".lia-message-body-content")); } else { if (rootElement.querySelectorAll('div.lia-quilt-row-footer').length > 0) { rootElement.querySelectorAll('div.lia-quilt-row-footer')[0].appendChild(tr_para); } else { rootElement.querySelectorAll('div.lia-quilt-column-message-footer')[0].appendChild(tr_para); } } } } catch (e) { } } } else { /* Do not display button for same language */ // syncList.remove(value); var index = $scope.syncList.indexOf(value); if (index > -1) { $scope.syncList.splice(index, 1); } } } } } } /*if(mszList_l.length <= 0){ setTimeout(()=>{ var mszListl = []; angular.forEach(document.querySelectorAll("[class*='lia-js-data-messageUid']"), function(element) { var mszId = element.getAttribute("data-lia-message-uid"); if (mszId != null) { mszListl.push(mszId); } }); var mszListid = mszListl; console.log("mszListl:",mszListl); },2000) }else{ var mszListid = mszList_l; }*/ console.log("mszList_l:",mszList_l.length); angular.forEach(mszList_l, function (value) { if (document.querySelectorAll('div.lia-js-data-messageUid-' + value).length > 0) { var rootElements = document.querySelectorAll('div.lia-js-data-messageUid-' + value); }else if(document.querySelectorAll('.lia-occasion-message-view .lia-component-occasion-message-view').length >0){ var rootElements = document.querySelectorAll('.lia-occasion-message-view .lia-component-occasion-message-view')[0].querySelectorAll('.lia-occasion-description')[0]; }else { var rootElements = document.querySelectorAll('div.message-uid-' + value); } angular.forEach(rootElements, function (rootElement) { if (value == '139284' && "ForumTopicPage" == "TkbArticlePage") { rootElement = document.querySelector('.lia-thread-topic'); } /* V1.1 Remove from UI */ if (document.getElementById("tr-msz-" + value)) { document.getElementById("tr-msz-" + value).remove(); } if (document.getElementById("tr-sync-" + value)) { document.getElementById("tr-sync-" + value).remove(); } /* XPath expression for subject and Body */ var lingoRBExp = "//lingo-body[@id = "+"'lingo-body-"+value+"'"+"]"; lingoRSExp = "//lingo-sub[@id = "+"'lingo-sub-"+value+"'"+"]"; /* Get translated subject of the message */ lingoRSXML = doc.evaluate(lingoRSExp, doc, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); for(var i=0;i
0){ angular.forEach(document.querySelectorAll(".PageTitle"), function(subEle) { subEle.textContent = sub_L; }); } } } // Label translation try{ var labelEle = document.querySelector("#labelsForMessage"); if(!labelEle){ labelEle = document.querySelector(".LabelsList"); } if(labelEle) { var listContains = labelEle.querySelector('.label'); if (listContains) { /* Commenting this code as bussiness want to point search with source language label */ // var tagHLink = labelEle.querySelectorAll(".label")[0].querySelector(".label-link").href.split("label-name")[0]; var lingoLabelExp = "//lingo-label/text()"; trLabels = []; trLabelsHtml = ""; /* Get translated labels of the message */ lingoLXML = doc.evaluate(lingoLabelExp, doc, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); var labelsLength = document.querySelector(".LabelsList").querySelectorAll(".label").length; var labelSnapshotLength = lingoLXML.snapshotLength; if (labelsLength == labelSnapshotLength){ for (var k = 0; k < lingoLXML.snapshotLength; k++) { //trLabels.push(lingoLXML.snapshotItem(i).textContent); if (k != 0) { //trLabelsHtml = trLabelsHtml + '
,
'; //diffVariable = kValue } try{ if(labelEle.querySelectorAll(".label")[k]){ tagHLink = labelEle.querySelectorAll(".label")[k].querySelector(".label-link").href; if ("ForumTopicPage" == "BlogArticlePage") { trLabelsHtml = trLabelsHtml + '
' + lingoLXML.snapshotItem(k).textContent + '
'; } else { // trLabelsHtml = trLabelsHtml + '
' + lingoLXML.snapshotItem(k).textContent + '
'; trLabelsHtml = trLabelsHtml + '
' + lingoLXML.snapshotItem(k).textContent + '
'; } } } catch(e){ } } } if (newSub.getAttribute("slang").toLowerCase() != code_l.toLowerCase()) { if (trLabelsHtml != "") { var labelSname = ""; if(labelEle.querySelector("ul li:nth-child(1)").getAttribute("aria-hidden")){ labelSname = labelEle.querySelector("ul li:nth-child(1)").outerHTML; } labelEle.querySelector("ul").innerHTML = ""; labelEle.querySelector("ul").innerHTML = labelSname + trLabelsHtml; } } } } } catch(e){ } } } /* V 2.0:3 = Store not translated reply id */ if(lingoRSXML.snapshotLength == 0){ if($scope.falseReplyID == "") { $.ajax({ url : "/api/2.0/search?q=select id,c_unsupported_language from messages where id ='"+value+"'", method:"GET", success : function(data){ console.log("Success :",data.data.items[0]); if(!data.data.items[0].c_unsupported_language){ console.log("false reply id:",value); $scope.falseReplyID = value; } }, error : function(data){ console.log("error",data); } }); } } /* Get translated Body of Replies/Comments */ var lingoRBXML = doc.evaluate(lingoRBExp, doc, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); for(var i=0;i
0) { var attachDiv = rootElement.querySelector('div.lia-quilt-row-main').querySelector('div.custom-attachments'); if (attachDiv) { attachDiv = attachDiv.outerHTML; }else if(rootElement.querySelector('div.lia-quilt-row-main').querySelectorAll('#attachments').length > 0){ if ("ForumTopicPage" == "BlogArticlePage") { attachDiv = rootElement.querySelector('div.lia-quilt-row-main .lia-message-body-content').querySelector('#attachments'); if (attachDiv) { attachDiv = attachDiv.outerHTML; } else{ attachDiv = ""; } }else{ attachDiv = rootElement.querySelector('div.lia-quilt-row-main').querySelector('#attachments').outerHTML; } } else { attachDiv = ""; } /* Feedback Div */ var feedbackDiv = ""; var feedbackDivs = rootElement.querySelector('div.lia-quilt-row-main').querySelectorAll('div.lia-panel-feedback-banner-safe'); if (feedbackDivs.length > 0) { for (var k = 0; k < feedbackDivs.length; k++) { feedbackDiv = feedbackDiv + feedbackDivs[k].outerHTML; } } }else { var attachDiv = rootElement.querySelector('div.lia-message-body-content').querySelector('div.Attachments.preview-attachments'); if (attachDiv) { attachDiv = attachDiv.outerHTML; } else { attachDiv = ""; } /* Everyone tags links */ if (document.querySelectorAll("div.TagList").length > 0){ var everyoneTagslink = document.querySelector('div.lia-quilt-row-main').querySelector(".MessageTagsTaplet .TagList"); if ((everyoneTagslink != null)||(everyoneTagslink != undefined)){ everyoneTagslink = everyoneTagslink.outerHTML; } else{ everyoneTagslink = ""; } } /* Feedback Div */ var feedbackDiv = ""; var feedbackDivs = rootElement.querySelector('div.lia-message-body-content').querySelectorAll('div.lia-panel-feedback-banner-safe'); if (feedbackDivs.length > 0) { for (var m = 0; m < feedbackDivs.length; m++) { feedbackDiv = feedbackDiv + feedbackDivs[m].outerHTML; } } } } } catch (e) { } if (body_L == "") { /* V 2.0:7 Replacing translated video data with source video data */ var newBodyVideoData = newBody.querySelectorAll('div[class*="vid-container"]'); angular.forEach($scope.videoData[value], function (sourceVideoElement, index) { if (index <= (newBodyVideoData.length - 1)) { newBodyVideoData[index].outerHTML = sourceVideoElement.outerHTML; } }); /* V 2.0:7 = Replacing translated image data with source data */ var newBodyImageData = newBody.querySelectorAll('[class*="lia-image"]'); angular.forEach($scope.imageData[value], function (sourceImgElement, index) { if($scope.imageData[value].length == newBodyImageData.length){ if (index <= (newBodyImageData.length - 1)) { if(newBodyImageData[index].querySelectorAll('img').length > 0){ newBodyImageData[index].outerHTML = sourceImgElement.outerHTML; // console.log("image of the loop2"); } } }else{ if (index <= (newBodyImageData.length - 1)) { try{ if(newBodyImageData[index].querySelectorAll('img').length > 0){ if(newBodyImageData[index].querySelector('img').getAttribute('title') == $scope.imageData[value][index].querySelector('img').getAttribute('title')){ newBodyImageData[index].outerHTML = sourceImgElement.outerHTML; } } }catch(e){ console.log(e); } } } }); /* V 2.0:7 = Replacing translated pre tag data with source data */ var newBodyPreTagData = newBody.querySelectorAll('pre'); angular.forEach($scope.preTagData[value], function (sourcePreTagElement, index) { if (index <= (newBodyPreTagData.length - 1)) { newBodyPreTagData[index].outerHTML = sourcePreTagElement.outerHTML; } }); } var copyBodySubject = false; if (body_L == "") { copyBodySubject = true; body_L = newBody.innerHTML; } /* This code is written as part of video fix by iTalent */ /* try{ var iframeHTMLText = body_L; var searchIframeText = "<IFRAME"; var foundiFrameTag; if (iframeHTMLText.indexOf(searchIframeText) > -1) { foundiFrameTag = decodeHTMLEntities(iframeHTMLText); foundiFrameTag = foundiFrameTag.split('src="
')[1]; body_L = foundiFrameTag; } } catch(e){ } */ /* This code is placed to remove the extra meta tag adding in the UI*/ try{ // body_L = body_L.replace('<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />',''); body_L = body_L.replace(/<meta\s+http-equiv=["']Content-Type["']\s+content=["']text\/html;\s*charset=utf-8["']\s*\/?>/i, ''); } catch(e){ } /** We should not replace the source content if user profile language and selected target language matches with source language **/ if(showTrContent) { var compiled = false; if(value == "139284") { var description = document.querySelector('meta[name="description"]'); var metaDescription = document.querySelector('meta[property="og:description"]'); description.setAttribute("content",removeTags(body_L)); metaDescription.setAttribute("content",removeTags(body_L)); } if("ForumTopicPage"=="IdeaPage"){ // var customAttachDiv = '
'; rootElement.querySelectorAll('div.lia-message-body-content')[0].innerHTML = body_L + feedbackDiv ; $compile(rootElement.querySelectorAll('div.lia-message-body-content')[0])($scope); compiled = true; /* Attach atttach div */ // document.querySelector("div.translation-attachments-"+value).innerHTML = attachDiv; rootElement.querySelectorAll('div.lia-message-body-content')[0].insertAdjacentHTML('afterend',attachDiv); if(rootElement.querySelectorAll('div.lia-quilt-idea-message .lia-message-body .lia-attachments-message').length > 1){ rootElement.querySelectorAll('div.lia-quilt-idea-message .lia-message-body .lia-attachments-message')[1].remove(); } } else { if("ForumTopicPage"=="TkbArticlePage" || "ForumTopicPage"=="QandAQuestionPage" || "ForumTopicPage" == "BlogArticlePage"){ rootElement.querySelectorAll('div.lia-message-body-content')[0].innerHTML = body_L + feedbackDiv ; /* $compile(rootElement.querySelectorAll('div.lia-message-body-content')[0])($scope);*/ }else{ if(rootElement.querySelectorAll('div.lia-message-body-content')[0]){ rootElement.querySelectorAll('div.lia-message-body-content')[0].innerHTML = body_L + feedbackDiv + attachDiv; compiled = true; } } } /* Destroy and recreate OOyala player videos to restore the videos in target languages which is written by iTalent as part of iTrack LILICON-79 */ /* Destroy and recreate OOyala player videos */ /*try{ // $scope.videoData[value][0].querySelector("div").getAttribute("id"); for(var vidIndex=0; vidIndex<$scope.videoData[value].length; vidIndex++){ if( $scope.videoData[value][vidIndex].querySelector("div") != null){ var containerId = LITHIUM.OOYALA.players[$scope.videoData[value][vidIndex].querySelector("div").getAttribute("id")].containerId; videoId = LITHIUM.OOYALA.players[$scope.videoData[value][vidIndex].querySelector("div").getAttribute("id")].videoId; vid = OO.Player.create(containerId,videoId); vid.destroy(); var vid = OO.Player.create(containerId,videoId); } } } catch(e){ }*/ try{ for(var vidIndex=0; vidIndex<($scope.videoData[value].length); vidIndex++){ if($scope.videoData[value][vidIndex].querySelector('video-js') != null){ var data_id = $scope.videoData[value][vidIndex].querySelector('video-js').getAttribute('data-video-id'); var data_account = $scope.videoData[value][vidIndex].querySelector('video-js').getAttribute('data-account'); var data_palyer = $scope.videoData[value][vidIndex].querySelector('video-js').getAttribute('data-player'); var div = document.createElement('video-js'); div.id = "brightcove"; div.class = "brightcove-player"; div.innerHTML = '
(view in my videos)
' var data = div.getElementsByClassName("video-js"); var script = document.createElement('script'); script.src = "https://players.brightcove.net/"+data_account+"/"+data_palyer+"_default/index.min.js"; for(var i=0;i< data.length;i++){ videodata.push(data[i]); } } } for(var i=0;i< videodata.length;i++){ const container = document.getElementsByClassName('lia-vid-container')[i].querySelector('.lia-video-brightcove-player-container'); container.innerHTML = videodata[i].outerHTML; container.appendChild(script); //document.getElementsByClassName('lia-vid-container')[i].querySelector('.lia-video-brightcove-player-container').innerHTML = videodata[i].outerHTML; //document.body.appendChild(script); } } catch(e){ } // if(!compiled){ /* Re compile html */ $compile(rootElement.querySelectorAll('div.lia-message-body-content')[0])($scope); // } } var tr_div = document.createElement("div"); var attrSet = { "data-aigc":"true", "data-content-type":"text", "data-content-id":"AIGC-TXT-M-P-"+value, "data-platform":"https://community.nxp.com", } for (const [key, val] of Object.entries(attrSet)) { tr_div.setAttribute(key, val); } let parseReply; if(replies != undefined){ parseReply = JSON.parse(replies) } if (code_l.toLowerCase() != newBody.getAttribute("slang").toLowerCase()) { /* Adding Translation flag */ var tr_obj = $filter('filter')($scope.sourceLangList, function (obj_l) { return obj_l.code.toLowerCase() === newBody.getAttribute("slang").toLowerCase() }); tr_div.setAttribute("data-explicit-label", "This content was translated from "+tr_obj[0].title+" using AI-assisted tools") if (tr_obj.length > 0) { let url = LITHIUM.CommunityJsonObject.Community.viewHref.slice(0, -1)+LITHIUM.CommunityJsonObject.Page.object.viewHref+"?trMode=source"; tr_text = "内容由 lilicon-trans-text 使用 AI 辅助工具翻译".replace(/lilicon-trans-text/g, tr_obj[0].title); tr_text += '
查看原文
'; try { if ($scope.wootMessages[$rootScope.profLang] != undefined) { tr_text = $scope.wootMessages[$rootScope.profLang].replace(/lilicon-trans-text/g, tr_obj[0].title); //url = url + "&" tr_text +='
查看原文
'; } } catch (e) { } } else { //tr_text = "This message was translated for your convenience!"; tr_text = "lilicon-trans.your.convenience"; } try { if (!document.getElementById("tr-msz-" + value)) { var tr_para = document.createElement("P"); tr_para.setAttribute("id", "tr-msz-" + value); tr_para.setAttribute("class", "tr-msz"); tr_para.style.textAlign = 'justify'; var tr_fTag = document.createElement("IMG"); tr_fTag.setAttribute("class", "tFlag"); tr_fTag.setAttribute("alt", "翻译图标"); //tr_fTag.setAttribute("title", "翻译图标免责声明"); tr_fTag.setAttribute("src", "/html/assets/translate-icon.svg"); tr_para.appendChild(tr_fTag); var container = document.createElement('span'); container.innerHTML = tr_text; //var tr_textNode = document.createTextNode(tr_text); tr_para.appendChild(container); parseReply.map(item => { if (item.id === parseInt(value)) { tr_div.setAttribute("data-generation-timestamp", item.date) } }); if(!rootElement.querySelector(".lia-message-body-content").parentElement.getAttributeNames().includes("data-generation-timestamp")){ rootElement.querySelector(".lia-message-body-content").parentNode.insertBefore(tr_div, rootElement.querySelector(".lia-message-body-content")); tr_div.appendChild(rootElement.querySelector(".lia-message-body-content")); } /* Woot message only for multi source */ if(rootElement.querySelector(".lia-message-body-content").previousElementSibling != null && rootElement.querySelector(".lia-message-body-content").previousElementSibling.getAttributeNames().includes("data-generation-timestamp")){ rootElement.querySelector(".lia-message-body-content").previousElementSibling.remove(); } if(rootElement.querySelector(".lia-quilt-forum-message")){ const parent = rootElement.querySelector(".lia-quilt-forum-message [data-aigc]"); const content = parent.querySelector(".lia-message-body-content"); parent.insertBefore(tr_para, content); } else if(rootElement.querySelector(".lia-message-view-blog-topic-message")) { const parent = rootElement.querySelector(".lia-message-view-blog-topic-message [data-aigc]"); const content = parent.querySelector(".lia-message-body-content"); parent.insertBefore(tr_para, content); } else if(rootElement.querySelector(".lia-quilt-blog-reply-message")){ const parent = rootElement.querySelector(".lia-quilt-blog-reply-message [data-aigc]"); const content = parent.querySelector(".lia-message-body-content"); parent.insertBefore(tr_para, content); } else if(rootElement.querySelector(".lia-quilt-tkb-message")){ const parent = rootElement.querySelector(".lia-quilt-tkb-message [data-aigc]"); const content = parent.querySelector(".lia-message-body-content"); parent.insertBefore(tr_para, content); } else if(rootElement.querySelector(".lia-quilt-tkb-reply-message")){ const parent = rootElement.querySelector(".lia-quilt-tkb-reply-message [data-aigc]"); const content = parent.querySelector(".lia-message-body-content"); parent.insertBefore(tr_para, content); } else if(rootElement.querySelector(".lia-quilt-idea-message")){ const parent = rootElement.querySelector(".lia-quilt-idea-message [data-aigc]"); const content = parent.querySelector(".lia-message-body-content"); parent.insertBefore(tr_para, content); } else if(rootElement.querySelector(".lia-quilt-idea-reply-message")){ const parent = rootElement.querySelector(".lia-quilt-idea-reply-message [data-aigc]"); const content = parent.querySelector(".lia-message-body-content"); parent.insertBefore(tr_para, content); } else if(rootElement.querySelector('.lia-quilt-occasion-message')){ const parent = rootElement.querySelector(".lia-quilt-occasion-message [data-aigc]"); const content = parent.querySelector(".lia-message-body-content"); parent.insertBefore(tr_para, content); } else { if(document.querySelectorAll(".threaded-message-list .lia-quilt-forum-message")){ var parentDiv = document.querySelectorAll(".threaded-message-list .lia-quilt-forum-message") if(parentDiv.length > 0){ var noClassDiv = Array.from(childDiv).find(div => !div.hasAttribute("class") && div.attributes.length > 0 ); if(noClassDiv != undefined && noClassDiv.getAttribute("data-aigc") && noClassDiv.getAttribute("data-content-id").includes(value)){ noClassDiv.remove(); tr_div.append(tr_para) parentDiv[0].appendChild(tr_div); } } }else if (rootElement.querySelectorAll('div.lia-quilt-row-footer').length > 0) { rootElement.querySelectorAll('div.lia-quilt-row-footer')[0].appendChild(tr_para); } else if(rootElement.querySelectorAll('div.lia-quilt-row-message-footer').length > 0){ rootElement.querySelectorAll('div.lia-quilt-row-message-footer')[0].appendChild(tr_para); }else { rootElement.querySelectorAll('div.lia-quilt-column-message-footer')[0].appendChild(tr_para); } } } } catch (e) { } } } else { /* Do not display button for same language */ // syncList.remove(value); var index = $scope.syncList.indexOf(value); if (index > -1) { $scope.syncList.splice(index, 1); } } } } /*$.ajax({ url : "/api/2.0/search?q=select id,c_unsupported_language from messages where id ='"+value+"'", method:"GET", success : function(data){ console.log("Success :",data.data.items[0]); if(data.data.items[0].c_unsupported_language){ tr_text = "Content originally entered in an unsupported language, then edited to a supported one, may yield less accurate automatic translations. We recommend reviewing the translated output."; if (!document.getElementById("tr-msz-" + value)) { var tr_para = document.createElement("P"); tr_para.setAttribute("id", "tr-msz-" + value); tr_para.setAttribute("class", "tr-msz"); tr_para.style.textAlign = 'justify'; var tr_fTag = document.createElement("IMG"); tr_fTag.setAttribute("class", "tFlag"); tr_fTag.setAttribute("src", "/html/assets/translate-icon.svg"); tr_para.appendChild(tr_fTag); var container = document.createElement('span'); container.innerHTML = tr_text; //var tr_textNode = document.createTextNode(tr_text); tr_para.appendChild(container); if(rootElement.querySelector(".lia-quilt-forum-message")){ rootElement.querySelector(".lia-quilt-forum-message .lia-message-body").insertBefore(tr_para,rootElement.querySelector(".lia-message-body-content")); } else if(rootElement.querySelector(".lia-message-view-blog-topic-message")) { rootElement.querySelector(".lia-message-view-blog-topic-message .lia-message-body").insertBefore(tr_para,rootElement.querySelector(".lia-message-body-content")); } else if(rootElement.querySelector(".lia-quilt-blog-reply-message")){ rootElement.querySelector(".lia-quilt-blog-reply-message .lia-message-body").insertBefore(tr_para,rootElement.querySelector(".lia-message-body-content")); } else if(rootElement.querySelector(".lia-quilt-tkb-message")){ rootElement.querySelectorAll(".lia-quilt-tkb-message .lia-message-body")[0].insertBefore(tr_para,rootElement.querySelector(".lia-message-body-content")); } else if(rootElement.querySelector(".lia-quilt-tkb-reply-message")){ rootElement.querySelectorAll(".lia-quilt-tkb-reply-message .lia-message-body")[0].insertBefore(tr_para,rootElement.querySelector(".lia-message-body-content")); } else if(rootElement.querySelector(".lia-quilt-idea-message")){ rootElement.querySelector(".lia-quilt-idea-message .lia-message-body").insertBefore(tr_para,rootElement.querySelector(".lia-message-body-content")); } else if(rootElement.querySelector(".lia-quilt-idea-reply-message")){ rootElement.querySelector(".lia-quilt-idea-reply-message .lia-message-body").insertBefore(tr_para,rootElement.querySelector(".lia-message-body-content")); } else if(rootElement.querySelector('.lia-quilt-occasion-message')){ rootElement.querySelector('.lia-quilt-occasion-message .lia-message-body').insertBefore(tr_para,rootElement.querySelector(".lia-message-body-content")); } else { if (rootElement.querySelectorAll('div.lia-quilt-row-footer').length > 0) { rootElement.querySelectorAll('div.lia-quilt-row-footer')[0].appendChild(tr_para); } else if(rootElement.querySelectorAll('div.lia-quilt-row-message-footer').length > 0){ rootElement.querySelectorAll('div.lia-quilt-row-message-footer')[0].appendChild(tr_para); }else { rootElement.querySelectorAll('div.lia-quilt-column-message-footer')[0].appendChild(tr_para); } } } } }, error : function(data){ console.log("error",data); } });*/ }); }); /* V 1.1:2 = Reply Sync button for multi source translation */ } catch(e){ console.log(e); } }; if((rContent != undefined) && (rContent != "")) { drawCanvas(decodeURIComponent(rContent)); /** Update variable with selected language code **/ $scope.previousSelCode = code_l; } }; /* removeTags for the meta tags */ function removeTags(innertext) { const unescaped = innertext .replace(/\\n/g, '\n') .replace(/\\t/g, '\t') .replace(/\\\\/g, '\\'); const tempDiv = document.createElement('div'); tempDiv.innerHTML = unescaped; const text = tempDiv.textContent || tempDiv.innerText || ''; const content_text = text.replace(/\s+\n/g, '').replace(/\n\s+/g, '').trim(); return content_text.slice(0,300); } /** * @function selectThisLang * @description Called on select dropdown. * @param {string} lang - Language code * */ $scope.selectThisLang = function (lang, anonymousFlag) { /* 1.4:3 Update Analytics on language selection */ /*try { setTimeout(()=>{ lingoThreadLangSelected(lang, '139284'); console.log("Language",lang); },5000) } catch (e) { console.log(e); }*/ /** Display Translated content **/ var getTranslation = lithiumPlugin.getTranslation(lang, "139284"); getTranslation.then(function (trContent) { if (trContent.body != "") { $scope.showPreview(trContent.body, $scope.mszList, lang, trContent.id, trContent.replies); } else { //$rootScope.errorMsg = "Translation is in progress. Please check again in a few minutes." //$rootScope.errorMsg = "lilicon-trans.is_in.progress" } }); }; var decodeEntities = (function() { // this prevents any overhead from creating the object each time var element = document.createElement('div'); function decodeHTMLEntities (str) { if(str && typeof str === 'string') { // strip script/html tags str = str.replace(/