Skip to content

Commit 68fa754

Browse files
Update projectimport.js to use the gulp buildsystem
1 parent ac3e9d3 commit 68fa754

File tree

4 files changed

+6
-9355
lines changed

4 files changed

+6
-9355
lines changed

gulpfile.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ var gulp = require('gulp'),
1717
// picking up dependencies of the primary entry points and putting any
1818
// limitations on directory structure for entry points.
1919
var sources = {
20-
core: ['js/readthedocs-doc-embed.js'],
20+
core: [
21+
'js/readthedocs-doc-embed.js',
22+
'js/projectimport.js',
23+
],
2124
projects: ['js/tools.js'],
2225
gold: ['js/gold.js'],
2326
donate: ['js/donate.js']

readthedocs/core/static-src/core/js/django-csrf.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
var $ = require('jquery');
2-
3-
41
function csrfSafeMethod(method) {
52
// these HTTP methods do not require CSRF protection
63
return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
74
}
85

6+
97
$.ajaxSetup({
108
beforeSend: function(xhr, settings) {
119
if (!csrfSafeMethod(settings.type) && !this.crossDomain) {

readthedocs/core/static-src/core/js/projectimport.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
$ = require('jquery');
21
require('./django-csrf.js');
32

43

0 commit comments

Comments
 (0)