From 4262b06598131faca39bd4bdbc7f354ac262d5a9 Mon Sep 17 00:00:00 2001 From: xa0082249956 <576810415@qq.com> Date: Sat, 29 Jun 2019 03:42:07 +0800 Subject: [PATCH] support rating submissions from Prime --- opr_tools_cn.user.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/opr_tools_cn.user.js b/opr_tools_cn.user.js index f4bf562..d58b004 100644 --- a/opr_tools_cn.user.js +++ b/opr_tools_cn.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name OPR tools CN -// @version 2.0.0 +// @version 2.1.0 // @description Add links to maps, rate on common objects, and other small improvements // @author CubicPill // @match https://opr.ingress.com/* @@ -412,7 +412,10 @@ function init() { // move portal rating to the right side. don't move on mobile devices / small width if (screen.availWidth > 768) { - const scorePanel = w.document.querySelector("div[class~='pull-right']"); + let scorePanel = w.document.querySelector('div[ng-show="subCtrl.hasSupportingImageOrStatement"]'); + if (scorePanel.classList.contains('ng-hide')) { + scorePanel = w.document.querySelector('div[ng-show="!subCtrl.hasSupportingImageOrStatement"]'); + } let nodeToMove = w.document.querySelector("div[class='btn-group']").parentElement; scorePanel.insertBefore(nodeToMove, scorePanel.firstChild); }