Using classic Outlook for Windows in business environments
I don't want to steal Ross Duran's thunder since they were the one who originally came up with this fix. Basically his fix is just a javascript which runs and moves the "containers" (DIV tags) that the move and delete buttons are under to a different location (being back to the original location). It's based on the CSS style tag that's applied to these "containers". Unfortunately MS updated these tags and they are pretty randomly named.
Anyways, full steps which I had taken:
- Install the Tampermonkey extension in your browser (I am using Edge since it's a MS product so Outlook will probably be more supported in it in general). You should be able to find it in the extensions store for the browser (In Edge you can go to the 3 dots>Extensions, then click the "Get extensions for Microsoft Edge" button and search/install the Tampermonkey one.
- Once installed, click the Details for Tampermonkey in the Extensions tab and then "Extension Options". This should bring up the Tampermonkey settings interface.
- If you've already setup the script it'll be under "Installed Userscripts" tab (You can edit the existing script by clicking the edit button beside the trashcan icon). If you haven't, then click the + to the left of that tab.
- Copy and paste the following code, then save the changes via File>Save. The name of the script and such is in the first few lines (which are comments) in case you want to rename it. I had also copied the additional external requirement and put it in the script since that way it's all self-contained.
- Once saved, refresh Outlook's page if you have it open. That should move the icons over again.
Again, all credit goes to Ross Duran who originally came up with the code/process. I just updated the tags to get it working again.
// ==UserScript==
// @name outlook quick actions hotfix
// @namespace www.rossdoran.com
// @version 0.1
// @description m$.gfy
// @match https://outlook.office.com/mail/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @run-at document-start
// ==/UserScript==
// custom style
$('head').append('');
waitForKeyElements(".UWVIR", moveQuickActions);
waitForKeyElements(".QpoLy", moveDeleteAction); // comment out this line to keep the delete quick action on the right
function moveDeleteAction(elem)
{
var elem = $(elem);
var parent = elem.parent();
if (parent.length > 0)
{
var newParent = parent.find(".xxeTh.XG5Jd");
if (newParent.length > 0 && !elem.hasClass("delete-hidden"))
{
var clone = elem.clone();
clone.appendTo(newParent);
elem.addClass("delete-hidden");
let rightDeleteAction = elem;
clone.click(function(e)
{
rightDeleteAction.click();
e.preventDefault();
return false;
});
}
}
}
function moveQuickActions(elem)
{
var elem = $(elem);
var parent = elem.parent().parent();
if (parent.length > 0)
{
var newParent = parent.find(".xxeTh.XG5Jd");
if (newParent.length > 0)
elem.detach().appendTo(newParent);
}
}
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
//--- Page-specific function to do what we want when the node is found.
function commentCallbackFunction (jNode) {
jNode.text ("This comment changed by waitForKeyElements().");
}
IMPORTANT: This function requires your script to have loaded jQuery.
*/
function waitForKeyElements (
selectorTxt, /* Required: The jQuery selector string that
specifies the desired element(s).
*/
actionFunction, /* Required: The code to run when elements are
found. It is passed a jNode to the matched
element.
*/
bWaitOnce, /* Optional: If false, will continue to scan for
new elements even after the first match is
found.
*/
iframeSelector /* Optional: If set, identifies the iframe to
search.
*/
) {
var targetNodes, btargetsFound;
if (typeof iframeSelector == "undefined")
targetNodes = $(selectorTxt);
else
targetNodes = $(iframeSelector).contents ()
.find (selectorTxt);
if (targetNodes && targetNodes.length > 0) {
btargetsFound = true;
/*--- Found target node(s). Go through each and act if they
are new.
*/
targetNodes.each ( function () {
var jThis = $(this);
var alreadyFound = jThis.data ('alreadyFound') || false;
if (!alreadyFound) {
//--- Call the payload function.
var cancelFound = actionFunction (jThis);
if (cancelFound)
btargetsFound = false;
else
jThis.data ('alreadyFound', true);
}
} );
}
else {
btargetsFound = false;
}
//--- Get the timer-control variable for this selector.
var controlObj = waitForKeyElements.controlObj || {};
var controlKey = selectorTxt.replace (/[^\w]/g, "_");
var timeControl = controlObj [controlKey];
//--- Now set or clear the timer as appropriate.
if (btargetsFound && bWaitOnce && timeControl) {
//--- The only condition where we need to clear the timer.
clearInterval (timeControl);
delete controlObj [controlKey]
}
else {
//--- Set a timer, if needed.
if ( ! timeControl) {
timeControl = setInterval ( function () {
waitForKeyElements ( selectorTxt,
actionFunction,
bWaitOnce,
iframeSelector
);
},
300
);
controlObj [controlKey] = timeControl;
}
}
waitForKeyElements.controlObj = controlObj;
}