Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion BigSur/plugins/swa.plugin/plugin.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugin.isAvailableForMessage = function(message) {
return (message.from[0].email.indexOf('luv.southwest.com') != -1);
return (message.from[0].email.endsWith('@luv.southwest.com'));
}

plugin.initialHTMLForMessage = function(message) {
Expand Down
4 changes: 3 additions & 1 deletion Explorations/WebPluginTest-PostMessage/public/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

<script>
var thread = {
"subject": "Order: Hello World!",
Expand All @@ -11,6 +10,9 @@

<script>
function pluginReady(plugin_name) {
// Sanitize plugin_name to allow only alphanumeric characters and underscores
plugin_name = plugin_name.replace(/[^a-zA-Z0-9_]/g, '');

var perform = function(js) {
window.frames[plugin_name].postMessage(js, '*');
}
Expand Down