diff --git a/django/contrib/admin/static/admin/js/admin/DateTimeShortcuts.js b/django/contrib/admin/static/admin/js/admin/DateTimeShortcuts.js
index 08b2785c06..1d9fbdaa77 100644
--- a/django/contrib/admin/static/admin/js/admin/DateTimeShortcuts.js
+++ b/django/contrib/admin/static/admin/js/admin/DateTimeShortcuts.js
@@ -1,4 +1,4 @@
-/*global Calendar, findPosX, findPosY, getStyle, get_format, gettext, gettext_noop, interpolate, ngettext, quickElement*/
+/*global Calendar, findPosX, findPosY, get_format, gettext, gettext_noop, interpolate, ngettext, quickElement*/
// Inserts shortcut buttons after all of the following:
//
//
@@ -197,7 +197,7 @@
// Recalculate the clockbox position
// is it left-to-right or right-to-left layout ?
- if (getStyle(document.body, 'direction') !== 'rtl') {
+ if (window.getComputedStyle(document.body).direction !== 'rtl') {
clock_box.style.left = findPosX(clock_link) + 17 + 'px';
}
else {
@@ -370,7 +370,7 @@
// Recalculate the clockbox position
// is it left-to-right or right-to-left layout ?
- if (getStyle(document.body, 'direction') !== 'rtl') {
+ if (window.getComputedStyle(document.body).direction !== 'rtl') {
cal_box.style.left = findPosX(cal_link) + 17 + 'px';
}
else {
diff --git a/django/contrib/admin/static/admin/js/core.js b/django/contrib/admin/static/admin/js/core.js
index 591394e551..37e3b85551 100644
--- a/django/contrib/admin/static/admin/js/core.js
+++ b/django/contrib/admin/static/admin/js/core.js
@@ -193,20 +193,3 @@ function findPosY(obj) {
};
})();
-// ----------------------------------------------------------------------------
-// Get the computed style for and element
-// ----------------------------------------------------------------------------
-function getStyle(oElm, strCssRule) {
- 'use strict';
- var strValue = "";
- if(document.defaultView && document.defaultView.getComputedStyle) {
- strValue = document.defaultView.getComputedStyle(oElm, "").getPropertyValue(strCssRule);
- }
- else if(oElm.currentStyle) {
- strCssRule = strCssRule.replace(/\-(\w)/g, function(strMatch, p1) {
- return p1.toUpperCase();
- });
- strValue = oElm.currentStyle[strCssRule];
- }
- return strValue;
-}