Skip to content

Commit

Permalink
Merge pull request #9 from xflagstudio/follow_zendesk_dom_update_2020…
Browse files Browse the repository at this point in the history
…0106

follow zendesk dom updates
  • Loading branch information
hashijun authored Jan 6, 2020
2 parents 0083aa0 + 60689ef commit 319b719
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 3 additions & 6 deletions test/zendesk-incident-protector.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,10 @@ const defaultDOM = new JSDOM(`
<footer class="ticket-resolution-footer">
<div class="ticket-resolution-footer-pane">
<div id="ember1234" class="ember-view">
<div dir="ltr">
<div class="LRf LRg LRh LRi LRj">
<div data-garden-id="buttons.button_group_view" data-garden-version="3.4.0" class="ButtonGroupView-hogehoge index__l-btn-group___hugahuga" dir="ltr">
<button class="save">submit</button>
</div>
<div class="LRf LRu LRo LRv">
<div data-garden-id="buttons.button_group_view" data-garden-version="7.1.0" class="ButtonGroupView-bLVKCC index__l-btn-group___13ccZ">
<button class="save">submit</button>
</div>
</div>
</div>
</div>
</footer>
Expand Down
4 changes: 2 additions & 2 deletions zendesk-incident-protector.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
selector: {
sectionPanel: 'section.main_panes:not([style*="display:none"]):not([style*="display: none"])',
footerPanelArea: 'footer.ticket-resolution-footer div.ticket-resolution-footer-pane',
buttonViewArea: 'div div div[class ^= "ButtonGroupView"]'
buttonViewArea: 'div div[class ^= "ButtonGroupView"]'
}
};
}
Expand All @@ -77,7 +77,7 @@
getButtonViewId(dom) {
// NOTE:
// get nearest id attribute on parent div.ember-view
return $(dom).parent().parent().parent().attr('id');
return $(dom).parent().parent().attr('id');
}

addValidator(targetWords, buttonViewId, locale) {
Expand Down

0 comments on commit 319b719

Please sign in to comment.