Skip to content
This repository was archived by the owner on Feb 15, 2022. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions opr_tools_cn.user.js
Original file line number Diff line number Diff line change
@@ -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/*
Expand Down Expand Up @@ -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);
}
Expand Down