Skip to content
This repository was archived by the owner on May 21, 2024. It is now read-only.

Commit 9bba6d0

Browse files
committed
Improve script and add class for the arrow
1 parent 198bd38 commit 9bba6d0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

js/script.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,9 @@ var RightClick = RightClick || {};
182182
var li = $('<li>').append(a.append(iconSpan).append(textSpan));
183183

184184
if (this.subOptions instanceof exports.Options && this.subOptions.getNbrOfOptions() > 0) {
185-
var sub = $('<a>').append($('<span>').text('▶').css('padding-right', '10px')).attr('style', 'width: auto; padding-right: 0px !important');
185+
var sub = $('<a>').append($('<span>').text('▶')
186+
.css('padding-right', '10px')).addClass('rightClickArrow')
187+
.attr('style', 'width: auto; padding-right: 0px !important');
186188

187189
new exports.Menu(sub, this.subOptions).setContext(li).setAsSubMenu().setAlsoOnHover().setAlsoOnLeftClick();
188190
li.append(sub);
@@ -329,9 +331,6 @@ var RightClick = RightClick || {};
329331
if (optionsDisabled)
330332
div.css('background-color', '#AAA');
331333

332-
if (!menu.isSubMenu)
333-
$('style.rightClickStyle').text('#rightClickMenu:after{transform:translateX(-50%);left:' + arrow + 'px;' + (optionsDisabled || options.isFirstDisabled() ? 'border-bottom-color:#AAA;' : '') + '} .rightSubMenu:after{display:none}');
334-
335334
div.on('mouseleave', function (event) {
336335
if (menu.isOpenedOnHover)
337336
menu.close();

0 commit comments

Comments
 (0)