2016-08-22 6 views
1

썬더 버드 번개 확장이 WeekDay 뷰의 왼쪽에있는 시간을 보여줍니다 썬더 버드 번개 확장에 주 및 일보기에서 다른 시간대에서 2 시간을 표시은 ... 다음과 같이

Screenshot

나는

Modified

은 conf의가 있습니까 ... 다음과 같이 2 개 개의 다른 시간대 (예 : 현지 시간과 태평양 표준시)를 표시하는 시간을 싶습니다 이 작업을 수행하는 데 필요한 매개 변수는 무엇입니까? 이것을 조정할 수있는 또 다른 확장 기능이 있습니까? 그렇지 않다면 어떻게 Thunderbird 확장 프로그램을 해킹하여이 작업을 수행 할 수 있습니까?

참고로 Outlook의 내용은 functionality입니다. 또한이 answer은 번개 확장 프로그램을 해킹하는 방법을 보여줍니다.

답변

0

나는 일반적인 경우에 대한 문제를 해결하지 못했습니다. 간단히 말해 현재 시간대와 이전 시간에 표시 할 시간을 표시했습니다. 내 경우, 현재 시간대는 미국 산악 시간이며 이전 시간은 미국 태평양 시간으로 끝납니다. 썬더 버드가 실행되지 않은 상태에서

Screenshot

다음 jar 파일의 파일 편집해야합니다.

C : \ 사용자 \ nreynold.ORADEV \의 AppData \ 로밍 \ 썬더 버드 \ 프로필 프로필 \ \ 확장 \ {e2fda1a4-762b-4020-b5ad-a41df1933103} \ chrome.jar

주석으로 표시된 바와 같이 변경해야합니다 makeTimeBox() 방법 :

function makeTimeBox(timestr, time2str, size) {    // Add time2str parameter 
    var box = createXULElement("box"); 
    box.setAttribute("orient", orient); 
    box.setAttribute("align", "left");      // Add 

    if (orient == "horizontal") { 
     box.setAttribute("width", size); 
    } else { 
     box.setAttribute("height", size); 
    } 

    var label = createXULElement("label"); 
    label.setAttribute("class", "calendar-time-bar-label"); 
    label.setAttribute("value", timestr); 
    label.setAttribute("style", "color: #4080C0; font-weight: bold;"); // Replace "align" 

    box.appendChild(label); 

    var label = createXULElement("label");     // Add 
    label.setAttribute("class", "calendar-time-bar-label"); // Add 
    label.setAttribute("value", time2str);     // Add 

    box.appendChild(label);         // Add 

    return box; 
} 

makeTimeBox() 후 다음과 같은 방법을 추가합니다.

function makeTime(hour) { 
    var h = hour % 12; 

    if (h == 0) 
     h = 12; 

    var s = hour >= 12 ? " pm" : " am"; 
    var result = h + s; 

    return result; 
} 

은 ... 수 ... makeTimeBox()

var formatter = Components.classes["@mozilla.org/intl/scriptabledateformat;1"]. 
       getService(Components.interfaces.nsIScriptableDateFormat); 

변경 다음 줄 아래에 몇 줄이 나타납니다 다음 행 ...

var timeString; 

를 제거

var timeString, time2String; 

약 25 행 lo WER는 ...

timeString = formatter.FormatTime("", 
            Components.interfaces.nsIScriptableDateFormat.timeFormatNoSeconds, 
            theHour, 0, 0); 
box = makeTimeBox(timeString, durPix); 

가 ... 수 ... 다음 줄을 교체

timeString = makeTime(theHour) + " MT"; 

ptHour = theHour - 1; 
ptHour += 23; 
ptHour %= 24; 
ptHour += 1; 

time2String = makeTime(ptHour) + " PT"; 
box = makeTimeBox(timeString, time2String, durPix); 
0

저는이 작업을 수행하는 기존 추가 기능에 대해 알지 못하지만 어떻게 처리되는지 알려 드릴 수 있습니다. 우선 Firefox의 세계에서 전형적인 뼈대 썬더 버드 확장을 생성합니다. 이것은 문서를 검색 할 때를 대비하여 "유산"확장이라고합니다. install.rdf와 chrome.manifest가 있어야합니다. chrome.manifest의 식별자로 view-zones을 선택했다고 가정합니다.

다음으로 calendar-time-bar 바인딩을 무시할 수있는 CSS 파일을 만들어야합니다. 이 메서드를 사용하면 바인딩을 재정의하는 확장명이 하나만있을 수 있습니다. 내용은 다음과 같이 표시됩니다

calendar-time-bar { 
    -moz-binding: url(chrome://view-zones/content/bindings.xml#calendar-time-bar) !important; 
} 

이것은 당신이 당신이 bindings.xml 파일에 생성되는 바인딩과 타임 바보다 우선합니다. 그것은 내장 된 타임 바를 연장하지만, 추가 레이블을 추가하기 위해 재 레이아웃 후에 약간의 코드를 추가합니다. CSS 파일은 style 지시어로 chrome.manifest 파일에서 참조해야하며 chrome://calendar/skin/calendar-views.css까지 확장 할 수 있습니다. 그런 다음 chrome://view-zones/content/bindings.xml에 대한 XML 파일 만들어야합니다 : 지금 정적 레이블을 떠 났어요

<?xml version="1.0" encoding="UTF-8"?> 
<!-- This Source Code Form is subject to the terms of the Mozilla Public 
    - License, v. 2.0. If a copy of the MPL was not distributed with this 
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> 

<bindings id="calendar-multiday-view-bindings" 
      xmlns="http://www.mozilla.org/xbl" 
      xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 
      xmlns:xbl="http://www.mozilla.org/xbl"> 
    <binding id="calendar-time-bar" 
      extends="chrome://calendar/content/calendar-multiday-view.xml#calendar-time-bar"> 
    <implementation> 
     <method name="relayout"> 
     <body><![CDATA[ 
      this.__proto__.__proto__.relayout.call(this); 
      let XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 
      let topbox = document.getAnonymousElementByAttribute(this, "anonid", "topbox"); 
      for (let box of topbox.childNodes) { 
      let timelabel = box.appendChild(document.createElementNS(XUL_NS, "label")); 
      timelabel.setAttribute("value", "10:00 PT"); 
      } 
     ]]></body> 
     </method> 
    </implementation> 
    </binding> 
</bindings> 

을,하지만 당신은 다른 라벨에 따라 실제 시간에 "10:00 PT"을 바꿀 것 몇 가지 논리를 생각할 수 또는 actual method에서 사용 된 알고리즘과 동일합니다. 클래스와 스타일을 추가하여 모양이 달라 지도록 할 수도 있습니다.

그렇다면 Lightning 코어에이 기능을 추가하는 데 관심이 있습니까? 나는 그것이 좋은 추가 일 것이다라고 생각한다. 나는 우리가 버그를 열어 놓은 것을 확신하지만, 지금은 발견 할 수 없으므로 어쩌면 당신은 아마도 file a bug 일 수 있고 나는 어떻게 설정하는지에 대한 더 많은 정보를 줄 수있다. 이 경우 binding을 변경하여 두 개 이상의 레이블을 표시하고 사용자가 볼 수있는 기본 설정을 추가하여 시간대를 선택할 수 있습니다.