Comments (2)
I've made some modifications based on your work. Now you just need to click the portal and click the “COPY” button in nav bar. Thanks for your sharing, saving lots of time.
// ==UserScript==
// @name ingress-maxfield
// @namespace https://intel.ingress.com/
// @version 0.1
// @description try to take over the world!
// @author 3verness
// @match https://intel.ingress.com/
// @grant none
// ==/UserScript==
(function() {
'use strict';
var copyButton = document.createElement("div");
copyButton.className = 'nav_link';
copyButton.innerHTML = 'COPY';
copyButton.addEventListener("click", copyFunc)
function copyFunc(){
//debugger
Tj(document.querySelector("#header_maplink"), "show_box");
displaymaplink();
var title = document.querySelector("#portal_primary_title").textContent;
var link = document.querySelector("#maplink").value;
var s = title+';'+link;
const input = document.createElement('input');
document.body.appendChild(input);
input.setAttribute('value', s);
input.select();
if (document.execCommand('copy')) {
document.execCommand('copy');
}
document.body.removeChild(input);
}
document.querySelector("#nav").appendChild(copyButton);
})();
from maxfield.
我根据你的工作做了一些修改。现在您只需单击门户并单击导航栏中的“复制”按钮。感谢您的分享,节省了很多时间。
// ==UserScript== // @name ingress-maxfield // @namespace https://intel.ingress.com/ // @version 0.1 // @description try to take over the world! // @author 3verness // @match https://intel.ingress.com/ // @grant none // ==/UserScript== (function() { 'use strict'; var copyButton = document.createElement("div"); copyButton.className = 'nav_link'; copyButton.innerHTML = 'COPY'; copyButton.addEventListener("click", copyFunc) function copyFunc(){ //debugger Tj(document.querySelector("#header_maplink"), "show_box"); displaymaplink(); var title = document.querySelector("#portal_primary_title").textContent; var link = document.querySelector("#maplink").value; var s = title+';'+link; const input = document.createElement('input'); document.body.appendChild(input); input.setAttribute('value', s); input.select(); if (document.execCommand('copy')) { document.execCommand('copy'); } document.body.removeChild(input); } document.querySelector("#nav").appendChild(copyButton); })();
Hi! To disturb. Excuse me, on line 19, Tampermonkey will report an error for "Tj". How to deal with it?
from maxfield.
Related Issues (20)
- Improve performance for large number of portals HOT 5
- ImportError: cannot import name ERROR HOT 5
- Link Map and Portal Map HOT 1
- ImportError: cannot import name process HOT 1
- Error: cannot import name process HOT 2
- freetype not found, although freetype6 is installed HOT 4
- Make KML instead of png plots HOT 2
- Excessive Maps API Calls HOT 1
- Old matplotlib version installs incompatible numpy version HOT 3
- Add fixed links for calculation HOT 2
- Build failing due to broken dependency pygifsicle. HOT 4
- error HOT 9
- Inbound-only portals? HOT 3
- Python error (?) HOT 9
- Python 3.10 error HOT 3
- Some questions about the front end.
- No gif gen on ngress-maxfield.com
- ortools requiring protobuf>=4.21.5. HOT 1
- Non-Google basemap (OSM, maybe)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from maxfield.