Tell NoScript users how to fix note display
This commit is contained in:
parent
c7c27935d0
commit
79334fdbd5
5 changed files with 30 additions and 5 deletions
|
@ -344,8 +344,24 @@
|
||||||
// Register handler for deferred setting of content
|
// Register handler for deferred setting of content
|
||||||
var self = this;
|
var self = this;
|
||||||
var listener = function() {
|
var listener = function() {
|
||||||
|
var win = self._iframe.contentWindow;
|
||||||
var SJOW = self._iframe.contentWindow.wrappedJSObject;
|
var SJOW = self._iframe.contentWindow.wrappedJSObject;
|
||||||
|
|
||||||
|
if (!SJOW.tinyMCE) {
|
||||||
|
var exts = Zotero.getInstalledExtensions();
|
||||||
|
for each(var ext in exts) {
|
||||||
|
if (ext.indexOf('NoScript') != -1) {
|
||||||
|
var warning = win.document.getElementById('noScriptWarning');
|
||||||
|
var str = "The NoScript extension is preventing Zotero "
|
||||||
|
+ "from displaying notes. To use NoScript and Zotero together, "
|
||||||
|
+ "whitelist the 'file://' scheme in the NoScript preferences.";
|
||||||
|
warning.appendChild(document.createTextNode(str));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var editor = SJOW.tinyMCE.get("tinymce");
|
var editor = SJOW.tinyMCE.get("tinymce");
|
||||||
if (!editor) {
|
if (!editor) {
|
||||||
// Not ready yet
|
// Not ready yet
|
||||||
|
|
|
@ -33,3 +33,9 @@ td.mceIframeContainer {
|
||||||
#tinymce_formatselect_text {
|
#tinymce_formatselect_text {
|
||||||
width: 65px;
|
width: 65px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#noScriptWarning {
|
||||||
|
padding: 4px;
|
||||||
|
font-family: "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
html, body {
|
html, body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
@ -18,6 +17,11 @@ html, body {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#noScriptWarning {
|
||||||
|
padding: 10px 8px 4px;
|
||||||
|
font-family: "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script type="text/javascript" src="tiny_mce.js"></script>
|
<script type="text/javascript" src="tiny_mce.js"></script>
|
||||||
|
@ -40,6 +44,6 @@ html, body {
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="tinymce"></div>
|
<div id="tinymce"><div id="noScriptWarning"/></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<title>TinyMCE</title>
|
|
||||||
<link type="text/css" rel="stylesheet" href="css/note-ui.css"/>
|
<link type="text/css" rel="stylesheet" href="css/note-ui.css"/>
|
||||||
<script type="text/javascript" src="tiny_mce.js"></script>
|
<script type="text/javascript" src="tiny_mce.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
@ -65,6 +64,6 @@
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="tinymce"></div>
|
<div id="tinymce"><div id="noScriptWarning"/></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -57,6 +57,6 @@ table.mceLayout > tbody > tr.mceLast {
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="tinymce"></div>
|
<div id="tinymce"><div id="noScriptWarning"/></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue