我正在编写一个greasemonkey脚本来操作DOM,查询服务器并在单独的jquery对话框中显示结果.我想为它添加以下两个功能:
我面临的问题是我想在对话框的ui-dialog-buttonpane区域中包含这两个区域,在关闭按钮的左侧,但我无法弄清楚如何做到这一点.
我所知道的是我可以使用window.find()(这里使用http://www.javascripter.net/faq/searchin.htm)来启用浏览器查找功能.
有人可以帮我弄这个吗 ?以下是我现有的greasemonkey脚本的代码:
// ==UserScript==
// @name Query for each URL Asynchronously
// @namespace SupportScript
// @include *
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js
// @require https://ajax.googleapis.com/ajax/libs/jquery/ui/1.11.0/jquery-ui.min.js
// @resource jqUI_CSS https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/themes/redmond/jquery-ui.css
// @grant GM_addStyle
// @grant GM_getResourceText
// @grant GM_getResourceURL
// @run-at document-end
// allow pasting
// ==/UserScript==
var snapshotResults = document.evaluate('//a[contains(@href,"http")]/@href', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
var windowWidth = $(window).width()-800;
var windowHeight = $(window).height();
var zNode = document.createElement ('input');
zNode.setAttribute ('id', 'SSButton');
zNode.setAttribute( …Run Code Online (Sandbox Code Playgroud) 将 shell 脚本 (/bin/bash) 添加到自动化工作流(复制文件路径)我想用它从正在复制到剪贴板的变量路径中去除常量前缀“/Volumes/”。
EG 复制文件路径工作流将“/Volumes/GRAID/audiovideo.mov”复制到剪贴板,我希望粘贴的路径是“GRAID/audiovideo.mov”
bash ×1
greasemonkey ×1
javascript ×1
jquery ×1
jquery-ui ×1
prefix ×1
strip ×1
userscripts ×1